Has anyone ever used a fibers or coroutines in real life?
I've read about fibers, and played about with them, but never come across a situation where I needed to use them. But there does seem quite a bit of chat about them on the web.
As far as I've worked out so far, they're a way of maintaining multiple stacks to you can reenter a function and carry on where you were. But as you have to explicitlt switch fiber, it looks like the kind of problem I've solved by splitting into subtasks (using task classes) and then scheduled on one or more threads (usually a small pool).
Based on one of the articles I scanned, which described fibers as a form of preemptive multitasking, it almost sounds like a rewind to WIN16 days!
I've used coroutines in Lua to conveniently describe the behavior of animated objects. Instead of keeping n objects whose states get modified by a function called on each of them, you keep n closures running on coroutines that pause and resume as needed.