in reply to Perl threads - just stuck

perlthrtut : It is important to remember that yield() is only a hint to give up the CPU, it depends on your hardware, OS and threading libraries what actually happens. On many operating systems, yield() is a no-op. Therefore it is important to note that one should not build the scheduling of the threads around yield() calls. It might work on your platform but it won't work on another platform.

Replies are listed 'Best First'.
Re^2: Perl threads - just stuck
by lostjimmy (Chaplain) on Mar 13, 2009 at 13:42 UTC
    In this case, it doesn't seem that yield would matter. If the start thread is sleeping for five seconds on every loop, there would be no reason that the other thread wouldn't get scheduled. And as you can see in sasikumar's reply, scheduling wasn't the issue at all.