Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
[ANN] fastthread-0.6.4.1 released
MenTaLguY
2/14/2007 11:29:00 PM
== NOW
A new version of fastthread, the library providing better
implementations of the classes in thread.rb, has been released.
Please note that fastthread is only for Ruby 1.8, not JRuby or any other
Ruby implementation (most of them don't need it anyway!).
== WHY
The existing implementation of Mutex, Queue, etc. in thread.rb is slow.
fastthread's is faster (and bypasses the memory leak in Ruby 1.8's
Array#shift to boot).
This particular release fixes two issues in previous fastthread
releases:
1) rb_bug()s due to stale wait queue entries
2) an uninitialized variable warning on load
== HOW
To use fastthread, just require it in addition to 'thread'. The API is
identical to the existing classes, so you shouldn't need to rewrite any
code (so long as you've been respecting the public interface of those
classes).
I'd recommend rescuing LoadError, to make it optional. (Remember, not
all Ruby implementations need it!)
== WHERE?
Files are available from Rubyforge:
http://rubyforge.org/frs/shownotes.php?relea...
== THE FUTURE
My hope is that fastthread won't be needed for much longer -- its code
has been merged into ruby_1_8 as a build option (in which case, simply
requiring 'thread' will get you the same stuff!), but there's not been a
fastthread-enabled release yet.
As for alternate Ruby implementations, JRuby already has its own
implementation of the thread.rb primitives which uses native Java
monitors, and I think we can expect other Ruby implementations to follow
its lead.
But, until we get a new fastthread-ized 1.8 release, fastthread is still
here for you.
Cheers,
-mental
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
[ANN] fastthread-0.6.4.1 released
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password