Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2021-10-24 18:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?