Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^8: threads on Windows

by gone2015 (Deacon)
on Feb 24, 2009 at 13:03 UTC ( [id://745983] : note . print w/replies, xml ) Need Help??

in reply to Re^7: threads on Windows
in thread threads on Windows

OK. Your test is much shorter than mine :-)

I'd recommend adding threads->yield() (or sleep()) before the async for the child -- to ensure the "STDIN thread" has reached the <>. (There is a race condition there.)

... I assume your 5.10 can function w/o the use of semaphores ...

Yes. It doesn't seem to matter on my system whether the close STDIN runs before or after the "STDIN thread" reaches the <> (I've tried it both ways).

But I cannot say whether that's a 5.10 thing, or because I'm running a uni-processor (or both, or neither).