hello,
on the following source i only see once
the msg 'thread 0' and then following endless
'main 1'
'main 2'
....
why does my thread blocks?
mark
require 'thread'
th = Thread.new do
tcnt=0
while 1 do
print "thread " + tcnt.to_s + "\n"
cnt = cnt+1;
Sleep 0.5
#stdout.flush
end
end
while 1 do
cnt=0
print "main " + cnt.to_s + "\n"
sleep 1
end
···
--
working with ruby 1.8.1 on winnt