problem: ruby-fcgi on windows blocks other threads

Z

Zefei Xuan

Hi,

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?

Thanks
 
A

ara.t.howard

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/
 
Z

Zefei Xuan

ara.t.howard said:
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.

Thank you. Does that mean Ruby 1.9 will solve this since it uses kernel
threads? (I've tried to compile 1.9 snapshot and fcgi on windows, but
they don't seem to work with apache/fastcgi.)
 
A

-a

Thank you. Does that mean Ruby 1.9 will solve this since it uses kernel
threads? (I've tried to compile 1.9 snapshot and fcgi on windows, but
they don't seem to work with apache/fastcgi.)

i dunno - i've barely looked at one nine. sorry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top