Original Post
I don't know how, but I ended up on this article, which discusses a simple Coroutine implementation in .NET using the Fibers API. Has anyone used it? A quick Google Groups search shows it is great for coroutines, I was wondering if anyone had gone forward with it. I am very interested in anything that has the potential to turn an asynchronous control flow into a linear one without the burdens that threads bring. Because fibers are made to be scheduled by the application, you can potentially avoid a host of race conditions. I sketched a Fiber class out:
It isn't wonderful and certainly isn't tested, I just needed to get something down. The most glaring problem is easily that of object lifetime issues. Anyway, let me know what you think and what sort of experience you have with fibers.
|