Cliff Moon on 27 Aug 2007 15:57:36 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PhillyOnRails] [Fwd: [jruby-dev] Basic Fiber support on trunk]


Wow, that was quick.  Looks like JRuby is getting fibers as well.  Sweet.
--- Begin Message ---
  • From: Charles Oliver Nutter <charles.nutter@sun.com>
  • To: dev@jruby.codehaus.org
  • Subject: [jruby-dev] Basic Fiber support on trunk
  • Date: Mon, 27 Aug 2007 10:26:42 -0500
  • Authentication-results: mx.google.com; spf=pass smtp.mail=dev-return-6253-cliff=chariotsolutions.com@jruby.codehaus.org
  • Mailing-list: contact dev-help@jruby.codehaus.org; run by ezmlm
  • Reply-to: dev@jruby.codehaus.org
  • Sender: Charles.O.Nutter@sun.com
  • User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)
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

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email



--- End Message ---
_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk