From: David Corbin Date: 2005-02-15T20:44:15+09:00 Subject: Re: Threading in Windows On Tuesday 15 February 2005 04:05 am, Robert Klemme wrote: > "William Morgan" schrieb im Newsbeitrag > news:20050214231001.GD26414@masanjin.net... > > > Excerpts from David Corbin's mail of 14 Feb 2005 (EST): > > > > I'd be surprised if Ruby allowed more than one thread to do a > > > > system() call at a time, > > > > > > Well, I could understand that (thought it would be bad). But I'm sure > > > that the three threads are running three process in parallel. > > > > Oh. Cool! > > > > > And what's more, none of the other threads will start until all the > > > one of the first three finishes. So, it's not just a limit of 3 > > > external processes (btw, looking at the source code, it looks like a > > > limit of 255 external processes). > > > > Then I don't know. There are some Windows-specific and Thread-specific > > blocking issues that I know of, but none of them have this behavior by > > themselves. > > If processes are short lived it could simply be a timing issue. They are not. I my spike, each thread was running for 5+ minutes. I have sample code at the office that I'll try to post. > The > overhead of creating a process is quite huge compared to that of creating > a ruby or native thread. And for example, if mem is low it'll take even > longer to spawn a process. Also, I noticed that Windows takes its time to > shutdown a process - it even looks like all pages are swapped in from disk > before the process is gone. Dunno much about Windows internals though... > > Kind regards > > robert