Hi, all This week I've finished the coroutine module, the implementation takes cloudwu's coroutine repo <https://github.com/cloudwu/coroutine> as a reference.
Within a single thread, all the coroutines are managed by the same scheduler and every time at most one coroutine will be running. Every single coroutine owns a user space stack of size 1.5 * PTHREAD_STACK_MIN(as the author of lwan said it is such number is decided empirically, well later we will do some tests to see whether it is also sufficient for Monkey :-) ). Also, I implemented a echo TCP server using the old callback manner. As what its name stands for, the server just send back whatever it read from a client. All details are in code <https://github.com/swpd/coroutine/blob/master/server_callback.c>. It is mostly for demonstration purpose so some error checkings are ommited. For the next week, I will be implementing the TCP server with the help of coroutine support. Blog Post: http://blog-swpd.rhcloud.com/gsoc-2014-update-duda-io-coroutines-week-3/ Github Repo: https://github.com/swpd/coroutine Best Regards, swpd
_______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
