Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://745983]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-26 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found