From: KOSAKI Motohiro Date: 2010-05-19T19:16:39+09:00 Subject: [ruby-core:30310] Re: [Feature #3176] Thread#priority= should actually do something Hi > Kosaki, I have tried using setpriority on linux to get the OS to handle priorities, but it failed > in the same way that pthread_setschedparam did; the test script would never finish and > wouldn't even respond to ^C. I have no idea why this is failing so badly. (Maybe a bug in > linux?? More likely a bug in my understanding.) Which test case do you use? I'll investigate the issue. > In any case, another problem with this approach is that you won't readily be able to set > a thread to higher priority than the main thread. Altho there may be ways around this, > they come with their own issues. For instance, if a ruby process is started at the lowest > possible priority (highest nice level) it won't be �possible to have threads within that > process be a different priority at all. On reflection, it seems better for ruby to manage its > own thread priority queue (at least on linux) and have a guaranteed level of support for > priorities and fixed number of available priorities. JVM have the same limitation. Then, I guess JRuby too. http://java.sun.com/j2se/1.5.0/docs/guide/vm/thread-priorities.html#150 So, I think we can accept the limitation too.