"William Morgan" <wmorgan-ruby-talk / masanjin.net> 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.  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