[ANN] fastthread-0.6.4.1 released

M

MenTaLguY

--=-Ht7erhIAma7nMQEApdkd
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

=3D=3D 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!).

=3D=3D WHY

The existing implementation of Mutex, Queue, etc. in thread.rb is slow.
=20
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

=3D=3D 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!)

=3D=3D WHERE?

Files are available from Rubyforge:

http://rubyforge.org/frs/shownotes.php?release_id=3D9709

=3D=3D 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

--=-Ht7erhIAma7nMQEApdkd
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQBF05svSuZBmZzm14ERAkfeAKDD3mBMpxaVfnYjTCl1RubU/nHsRgCfX2sX
fqhVREsCUkXt1wgw8Eer0W4=
=cHJW
-----END PGP SIGNATURE-----

--=-Ht7erhIAma7nMQEApdkd--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top