From: Jason Roelofs Date: 2008-01-16T21:23:45+09:00 Subject: Re: native threads in ruby ------=_Part_22455_6877944.1200486232124 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Jan 16, 2008 6:12 AM, Charles Oliver Nutter wrote: > Rick Penn wrote: > > Is there anyway possible, one can make use of native threads in Ruby? > > Maybe by interfacing with C or Java? > > JRuby supports native threads today, where each Ruby thread maps to one > native thread. There's also a second option, native thread pooling, > where the number of native threads used is only ever as high as the > number of threads running concurrently. > > Normal native thread support is the default. Pooling can be enabled with > a command-line option: > > -J-Djruby.thread.pooling=true > > - Charlie > > --enable-threading will put 1.8.6 in native thread mode, but it is unadvised to do so. Ruby 1.9 does uses native threads as well as a construct called Fibers, which I think are a better implementation of 1.8.6's green threads. Jason ------=_Part_22455_6877944.1200486232124--