From: Bulat Ziganshin Date: 2002-10-04T13:54:54+09:00 Subject: Re: Please help, question regarding threads Hello Ben, Thursday, October 03, 2002, 11:17:41 PM, you wrote: >> if he writes server, not client, it is better to use one thread per >> connection. also, ruby threads are very light and IMHO you can't save >> time by simulating thread switching in your own code BS> Would you care to explain why? because you need to work with several connections in one thread, emulating ruby own threads. on my 1200 mhz box, ruby primitives run in about 1 microsec, thread switching is about 20 microsec, and create+destroy thread is about 50 microsec BS> is a bad idea. Keep in mind, however, that the thread implementation in BS> ruby (the C interpreter) is likely to be radically different from an BS> implementation in JRuby (the Java interpreter). may be or may be not. who knows :) -- Best regards, Bulat mailto:bulatz@integ.ru