... in principle it is not possible to share object references between threads ...
But, IO::Socket::INET objects are not objects in the traditional perl sense in as much as they are actually globs. And, in common with traditional filehandles which are also globs, it is possible to derive a fileno from them, which is just a number (scalar) and can be passed between threads. Once you have the fileno in the thread, it is possible to dup a new glob from that fileno and so use that to access the socket.
However, thread handles are true objects. So, whilst if you have the cpan version of threads, signalling between threads is possible, for your scheme to work, the child thread that is going to signal the main thread would require a thread handle in order to call the kill method upon it. How are you going to pass the thread handle (object) to the child thread(s) inorder to do this?
It is possible through another round-about mechanism, but you surely haven't identified it.
In reply to Re^2: sharing (io::socket) objects with threads
by BrowserUk
in thread sharing (io::socket) objects with threads
by bumby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |