From: Dave Thomas Date: 2001-12-20T14:38:31+09:00 Subject: [ruby-talk:29071] Re: A Ruby programmer walked into a bar and ordered a Ruby-Thread "Mark Hahn" writes: > In this situation, correct behaviour if for the higher priority thread to > run all the time and the lower one to never run. At any moment whichever > requesting thread has higher priority should be running. For example: Thread.current.priority = 10 c1 = 0 a = Thread.new { Thread.stop; loop { c1 += 1 }} a.priority = Thread.current.priority - 2 # a lower priority a.wakeup sleep 1 Thread.critical = true p c1 Unfortunately, under Linux, it reports a count, as it does with the MSWin32 Ruby. Under Cygwin on my box, it loops forever, with the main thread sitting in the sleep. Threads should work, and with consistent cross-platform semantics. The fact that they don't is a bug that as a community we need to address. Dave