Hi,

In message "[ruby-talk:10420] Preemptive scheduling?"
    on 01/02/06, Clemens Wyss <wys / helbling.ch> writes:

|In the following example:
|
|  def recursion(n)
|    if n == 0 then
|      1
|    else
|      (n * recursion(n-1)) **2 
|    end
|  end
|
|  th1 = Thread.new {
|    print recursion (50)
|  }
|  th1.priority = -5
|  th2 = Thread.new {
|    sleep .1
|    th1.kill()
|  }
|  th2.priority = 4
|  th1.join()
|
|thread th2 should kill th1, but this is not the case!

What are you expecting?  On my box th2 seemed to have killed th1.

p.s.
Do not use mere numbers for conditionals.  It may cause surprising
effect inherited from Perl.  I will disable this feature someday.

							matz.