digitalmars.D - "Protothreads"
Is something like this implementable in D with the newly added template and mixin abilities? http://www.sics.se/~adam/pt/ Assuming they would be useful and it can be done, any opinions on how they would perform compared to the current threading implementations for both Windows and Linux? Thanks.
Mar 14 2006
Dave wrote:Is something like this implementable in D with the newly added template and mixin abilities? http://www.sics.se/~adam/pt/It would be really nice to have something like that. I have written a select-based httpd server in the past (no threads, just select on socket / multiplexing) and it was quite fast (I believe other servers like Xitami, lighthttpd etc use a similar approach). But having to use state machines was a pain. Ditto for an rsync server. Something like Protothreads would have been neat. marcio
Mar 15 2006
In article <dv998q$4ee$1 digitaldaemon.com>, Marcio says...Dave wrote:I agree - I don't know enough about the recent changes in D's template semantics to say if it's possible or not... I'm guessing not, but perhaps there is another way (w/o strictly duplicating the C macro approach)? Thanks, - DaveIs something like this implementable in D with the newly added template and mixin abilities? http://www.sics.se/~adam/pt/It would be really nice to have something like that. I have written a select-based httpd server in the past (no threads, just select on socket / multiplexing) and it was quite fast (I believe other servers like Xitami, lighthttpd etc use a similar approach). But having to use state machines was a pain. Ditto for an rsync server. Something like Protothreads would have been neat. marcio
Mar 15 2006