in reply to Non closing sockets - threads
If you want a thread to do something you need a means to communicate with it. In this case (AFAICS -- I regret I did not have the patience to wade through the code you posted, partly because it was all over the place) you want the thread(s) either to give up or to reestablish connection.
You could use a shared variable that the thread(s) could check on a regular basis. (You could use a Thread::Queue or a Thread::Semaphore, but that's probably over the top.)
You may be able to use a signal, see thread-signalling, depending on version of perl etc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Non closing sockets - threads
by BrowserUk (Patriarch) on Dec 15, 2008 at 12:59 UTC | |
by gone2015 (Deacon) on Dec 15, 2008 at 14:08 UTC | |
by BrowserUk (Patriarch) on Dec 15, 2008 at 14:13 UTC |