in reply to Re^2: Passing sockets between segregated threads
in thread Passing sockets between segregated threads
Sorry. I didn't notice you were using T::Q::Duplex, and assumed T::Q.
However, I recently had exactly the same symptom, "Bad file descriptor" error, trying to dup IO::Socket::INET handles in peer threads, and I cured it, reliably, by the technique I described.
I'm not familiar with T::Q:Duplex, but I would suggest looking closely at the timing of your code. A few trace statements with HiRes timestamps or simply push a copy of the file handle returned from the accept onto a package scope array and comment out the close. See if it makes a difference.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Passing sockets between segregated threads
by renodino (Curate) on Oct 20, 2005 at 18:01 UTC | |
by BrowserUk (Patriarch) on Oct 20, 2005 at 18:03 UTC |