4 ms·
One of our students[0] at Monkey Project Organization[1] through Google Summer of Code[2], wrote a complete co-routine implementation for the Duda I/O[3] Web Se
by edsiper2 12y ago
One of our students[0] at Monkey Project Organization[1] through Google Summer of Code[2], wrote a complete co-routine implementation for the Duda I/O[3] Web Services stack.
The feature is called "dthread" or "duda-thread" which aims to expose Channels and generic co-routines functionalities, you can check the following relevant links:
a. The co-routine implementation:
https://github.com/monkey/duda/blob/master/src/duda_dthread.c https://github.com/monkey/duda/blob/master/src/duda_dthread....
it does not need mutex or anything similar, short code but a lot of thinking behind it.
b. Example: web service to calculate Fibonacci using channels:
https://github.com/monkey/duda-examples/blob/master/080_dthread_fibonacci/main.c https://github.com/monkey/duda-examples/blob/master/080_dthr...
the whole work will be available on our next stable release, if someone want to give it a try, just drop us a line.
[0] http://blog-swpd.rhcloud.com http://blog-swpd.rhcloud.com
[1] http://monkey-project.com http://monkey-project.com
[2] http://www.google-melange.com http://www.google-melange.com
[3] http://duda.io http://duda.io
- sircomatose 12y agoThat's very interesting work. I did a similar thing for Kore for its background task implementation so that page handlers could talk to its tasks it fired off and read its responses accordingly. See example on https://github.com/jorisvink/kore/tree/master/examples/tasks https://github.com/jorisvink/kore/tree/master/examples/tasks
- edsiper2 12y agonice!, its good to see many people working on that area. We got a lot of support from the author of LWan (http://lwan.ws http://lwan.ws) project during the development process.