in reply to Re: Using Select and pipes to communicate with threads
in thread Using Select and pipes to communicate with threads
Pass 2 pipes to each thread? set the second pipe as reader in the thread and writer in the main thread. Probably you would have to stuff the pipe filehandles in a hash in the main thread, so you could keep track of which pipe writes to which thread. I suppose you can run IO::Select in each thread to watch for messages, or setup an eventloop to watch the filehandle, or a basic loop of some sort.
I will work on an example. :-)
|
|---|