By bloid
via espace.com.eg
Published: Sep 03 2008 / 02:06
You know Thread, but have you heard of his red haired step child? Fiber? Fibers are a new and a note worthy addition to Ruby that appeared with 1.9. They are essentially code blocks that can be paused and resumed. They have to be forced to do so, unlike threads which are well mannered and just step aside when someone is in a hurry. Fibers are not a totally new ideas, they have been known for ages as Coroutines. But how does those fibers work? Let's start by the canonical example



Add your comment