From: Marcin Raczkowski Date: 2007-05-10T01:00:04+09:00 Subject: Re: basic threading question: can ruby use real threads? On Tuesday 08 May 2007 21:34, Kyle Schmitt wrote: > OK, so I'm reading that article, and I'm getting three things form it: > YARV uses native threads. > YARV doesn't run them simultaneously. > YARV will eventually run them simultaneously. > > Good enough for me, I'll just hope that writing threaded code doesn't > change to much with ruby2.0/YARV. > > --Kyle well you can use fastthreads gem (part of mongrel) also you can fork your script ^^ threads usually execute on same processor AFIK, that's why if you want to use 2 processors you have to fork your scripts, and if you need comunication between them consider using drb. very good gem is slave - it makes creating new processes super easy - it provides easy way to comunicate, so you can create 4-6 new processes each will get data to compute from mother process and the'll use both processors sorry for lots of randomness and strange grammar - to much coffeine to sumarize - read rdoc for gems: - fasthread(s) - slave(s) (i never remember if they are plurar or singular) -- Marcin Raczkowski --- Friends teach what you should know Enemies Teach what you have to know