Coroutines in D

2011-05-03 Thread Andrej Mitrovic
I'm trying to figure out how to use coroutines in D. First, I think I've run into some kind of bug. I've followed this C++ example: http://www.subatomicglue.com/secret/coro/readme.html, and came up with this: import std.stdio; import core.thread; void fiberFunc(size_t arg)

Re: Coroutines in D

2011-05-03 Thread Andrej Mitrovic
Ok,I've found a post that could be useful: http://www.digitalmars.com/d/archives/digitalmars/D/yield_C_etc_74821.html and there's a Generator mixin in generators.d, from the libs_d library: http://www.fantascienza.net/leonardo/so/index.html I'll give these a try soon.

Re: Coroutines in D

2011-05-03 Thread Robert Clipsham
On 03/05/2011 19:06, Andrej Mitrovic wrote: I'm trying to figure out how to use coroutines in D. First, I think I've run into some kind of bug. I've followed this C++ example: http://www.subatomicglue.com/secret/coro/readme.html, and came up with this: I'm not entirely