[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: problem: ruby-fcgi on windows blocks other threads
From:       "ara.t.howard" <ara.t.howard () gmail ! com>
Date:       2007-11-15 20:37:49
Message-ID: 014A9800-BE49-4844-89D6-7F89E008E9A8 () gmail ! com
[Download RAW message or body]


On Nov 15, 2007, at 8:32 AM, Zefei Xuan wrote:

> I'm working on a project that requires me to run a multi-thread script
> on windows/apache/fastcgi, but ruby-fcgi seems to block all other
> threads when listening to the request. I tested this on Linux, and  
> fcgi
> works nicely with other threads on Linux; however, I have to do  
> this on
> windows for the project. Can someone tell me why this happens on
> windows?

certion io operations block all threads on windows because ruby uses  
green threads.  you must move to a multi-process model - there isn't  
really another option.  if you can spawn the script externally check  
out systemu

   http://codeforpeople.com/lib/ruby/systemu/systemu-1.1.0/README

it will at least allow you to spawn background processes in a thread  
without blocking.

regards.

a @ http://codeforpeople.com/
--
it is not enough to be compassionate.  you must act.
h.h. the 14th dalai lama




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic