In article <985071206.310437.31062.nullmailer / ev.netlab.zetabits.com>,
 matz / zetabits.com (Yukihiro Matsumoto) wrote:

> Hi,
> 
> In message "[ruby-talk:12905] Native/pthreads in Ruby"
>     on 01/03/20, Christopher Petrilli <petrilli / amber.org> writes:
> 
> |I read everything I could find in the archives talking about 
> |implementing pthreads in Ruby, and I'm wondering if anyone has started 
> |on this.  I'm working on a project which is pretty I/O intensive and 
> |this would help enormously in writing a fast version.  I'm currently 
> |working to convert the code from Python (which uses pthreads), and I'm 
> |running into that wall.
> |
> |Ideas?
> 
> The conservative GC which Ruby is using does not work well with
> pthreads.  Unfortunately pthread does not provide the way to get stack
> boundary of each thread.  You have to restrict Ruby interpreter to be
> run on only one thread to get along with native threads.

I'm pretty sure you can do mark and sweep with pthreads, as Python 
recently moved to a combination of ref count plus a modified mark and 
sweep system, and I've used it with over 1000 threads before.  
Unfortunately, I know very little about garbage collection in Ruby, as 
I'm a rather new (i.e. VERY) user of it.  I love what I see, but threads 
could be a sticking point for some applications.

Chris