From: Zhukov Pavel Date: 2008-06-24T23:56:27+09:00 Subject: Re: Threads in JRuby vs standard Ruby On Tue, Jun 24, 2008 at 6:29 PM, Iñaki Baz Castillo wrote: > El Martes, 24 de Junio de 2008, Guillermo.Acilu@koiaka.com escribió: >> Hello guys, >> >> This is the first time I am working with threads and so far it gave me a >> good result in the speed of my code, using Ruby 1.8.6 in the native Mac OS >> X distribution. By I read in the book "The Ruby Programming language" that >> the threads in the standard "C" Ruby 1.8.6 are not real OS threads and >> they all share the same main Ruby thread. I have read also that JRuby >> implements real OS threads. > > Read this good document about Ruby threading: > http://www.infoq.com/news/2007/05/ruby-threading-futures > > >> My code triggers more than 200 threads each of them with one private >> connection to a MySQL database. >> >> Would it be a real advantage to use JRuby in this scenario? > > Well, Ruby threads are "green" threads, this is: they only exist into the Ruby > process but not for the OS so all the threads runned into a Ruby process > share the same processor (you get not advantage of a multiprocessor > computer). > > JRuby uses the Java virtual machine, and that uses real OS threads, but that's > all I know :) > > > > > -- > Iñaki Baz Castillo > > Same problem. But i solve it as DRb + fork.