in reply to Re^8: Multithreaded Server Crashes under heavy load
in thread Multithreaded Server Crashes under heavy load
which does open( PUTFILE, ">$outfile" ) or threads->exit;. The threads->exit is clearly getting called, leaving the socket open.
FWIW: I have written a crap load of threaded perl code and never had occasion to use thread->exit;. It is IMO redundant and dangerous.
I would code that line as simply:
open( PUTFILE, ">$outfile" ) or return;
That way, all the normal perl cleanup will take place before the thread function returns and the thread terminates.
Try it, it just might sort out a lot of your problems!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Multithreaded Server Crashes under heavy load
by rmahin (Scribe) on Sep 11, 2012 at 17:49 UTC |