Wow, that was quick. Looks like JRuby is getting fibers as well. Sweet.
Date: August 27, 2007 11:26:42 AM EDT
Subject: [jruby-dev] Basic Fiber support on trunk
I've committed really basic Fiber support on trunk. It passes the simple tests from YARV's test_fiber (also committed, with bits commented out), and appears to run all demo code I've found online. The following parts aren't implemented yet:
- all error-handling
- Fiber.transfer (I wasn't clear how this is supposed to work, but it will probably be simple to do)
Also, two tests in test_fiber that construct a thousand or more fibers are commented out, because my implementation uses native threads (and the 10000-fiber test never seemed to return). This isn't to say it's not possible to support that many fibers with this impl, but it won't be cheap.
Anyway, have a look at the code. I've asked for clarification or a pointer to Fiber spec docs on ruby-core list...we can fill out the rest of the behavior then.
- Charlie
---------------------------------------------------------------------
To unsubscribe from this list please visit:
_______________________________________________
To unsubscribe or change your settings, visit: