AST macros
David B. Held
dheld at codelogicconsulting.com
Tue Mar 20 01:13:14 PDT 2007
Daniel Keep wrote:
>
> [...]
> Cooperative multithreading does not a coroutine make. Fibers, IIRC, are
> just stack-based threads. Coroutines are *entirely different*, although
> in this particular case they are implemented *using* stack threads.
> [...]
Wikipedia seems to think they are essentially the same thing:
http://en.wikipedia.org/wiki/Fiber_%28computer_science%29
Fibers are less than stack-based threads because they are cooperative.
Whereas in a coroutine you write "return", in a fiber you write "yield".
Otherwise, I believe they are closely isomorphic.
Dave
More information about the Digitalmars-d
mailing list