|
|
Re: [jruby-dev] Basic Fiber support on trunk: msg#00172
|
Subject: |
Re: [jruby-dev] Basic Fiber support on trunk |
On 8/27/07, Charles Oliver Nutter <charles.nutter-xsfywfwIY+M@xxxxxxxxxxxxxxxx> wrote:
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.
http://svn.codehaus.org/jruby/trunk/jruby/src/org/jruby/libraries/FiberLibrary.java http://svn.codehaus.org/jruby/trunk/jruby/test/externals/mri/ruby/test_fiber.rb
Cool. Did Mental write that code? Because it's his name in the copyright section...
/Nick
|
| |