From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-12-20T17:29:09+09:00 Subject: [ruby-talk:29084] Re: A Ruby programmer walked into a bar and ordered a Ruby-Thread In article , Dave Thomas wrote: >"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. So, from what you're saying this is a cygwin problem. If we go to using MS VC++ to build Ruby on Windows (and that's the plan right?) the problem goes away, correct? (if so, it seems to be an easy fix) What if you're using a Ruby built with mingw? > >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. true. Phil