Internal and external iteration, fibers
qznc
qznc at go.to
Sat Jan 19 00:45:25 PST 2013
On Friday, 18 January 2013 at 17:59:36 UTC, Nick Sabalausky wrote:
> Then there's C/C++ which has libs that offer what are known as
> "stackless fibers". These utilize the preprocessor, along with
> switch
> and goto, to accomplish the same thing that (AIUI) C# does for
> its
> coroutines: It lets the user write a normal coroutine, with a
> normal
> yield, which then gets trivially rewritten behind-the-scenes
> into an
> event loop (with NO actual fibers involved). I'm not sure to
> what
> extent this would be possible in D. If it is, the lack of
> preprocessor
> would probably make it much less nice-looking to use than the
> C/C++/C#
> versions. (Not that I'd want a preprocessor.)
Is this also known as protothreads?
http://dunkels.com/adam/pt/
More information about the Digitalmars-d
mailing list