Hi All,
i execute small ruby code:
puts(“in x\n”)
x = Thread.current
y = Thread.start {
i = 0;
while (1)
puts(“in y #{i}\n”)
STDOUT.flush()
i +=1;
end
puts(“in y1\n”)
STDOUT.flush()
}
puts("in x1\n")
STDOUT.flush()
system(“sleep 5”)
`sleep 5`
it seems that using sleep 5
cause y thread to hang.
if i change in and remark sleep 5
and unmark system command , it seems
to work just fine.
is it a bug?
is this is the righr behavior?
i’m using a little bit old version of ruby (1.8.2) but still, i didn’t
find any post about this issue.
i’ll happy to hear any comment about this issue.
Thanks,
Noam.