Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^3: multiple infinite loops

by melora (Scribe)
on Oct 06, 2004 at 16:52 UTC ( #397082=note: print w/replies, xml ) Need Help??

in reply to Re^2: multiple infinitive loops
in thread multiple infinitive loops

I was working on a perl script under windows recently and found that it blocked (wouldn't even time out) while attempting to connect to a network socket (This wasn't a problem on other platforms.). I ended up forking a child process to attempt the connection, and having the parent kill it if it went too long. From what you've shown so far, I would suggest trying to fork a child process for each of those event-handling tasks. That would allow both event handlers to be available and avoid blocking everything when one process blocks.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2023-05-30 16:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found