Issue #4326 has been updated by Charles Nutter.


RPRR and Nobu make good points.

Fibers are coroutines...agreed.

If we go by Knuth, a subroutine "is a" coroutine, but you're thinking about the relationship wrong. A Hash "is a" Object. We don't expect Object (coroutine) to do what Hash (subroutine) can do and you cannot use an Object (coroutine) in the place of a Hash (subroutine). Simply put, Knuth's statement doesn't mean Fiber should be usable everywhere a subroutine (Proc) can be used.

RPRR's points about threading and root fibers are also important, since they explicitly mean you can't use a Fiber in place of a thread-agnostic subroutine.

In practice I don't really care about adding [] and .call to Fiber, but they do mask the fact that these are not simply "resumable procs".
----------------------------------------
http://redmine.ruby-lang.org/issues/show/4326

----------------------------------------
http://redmine.ruby-lang.org