[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

A problem with relative priority of threads (newbie

dingo

5/10/2006 11:21:00 PM

Hi All,

I am newbie to Ruby:) Created some tests and browsed the group to find
some answers on the subject. What I would like to do is to have two
threads where one runs more often than another. It seems the way to do
anything like this is by using Thread#priority. What I have been able
to do so far is making one thread to run exclusively (higher priority),
while thread #2 (with lower priority) doesn't get any run-time at all!
This doesn't seem right, but maybe I am missing something here.

Any ideas how to accomplish what I want?
Thanks

1 Answer

dingo

5/10/2006 11:32:00 PM

0

OK, I think sleep with small value as a parameter lets me do what I
want:)