in reply to Re^3: poe/win32/fork/threads chat-application
in thread poe/win32/fork/threads chat-application
From the POD for Win32::Pipe:
If someone is waiting on a Read and the other end terminates then you will wait for one REALLY long time! (If anyone has an idea on how I can detect the termination of the other end let me know!)
All pipes are blocking. I am considering using threads and callbacks into Perl to perform async IO but this may be too much for my time stress. ;)
By splitting the problem into two processes that communicate via a blocking pipe, you've just recreated the original problem. Twice.
Instead of a single process that has the problem of servicing a (non-blocking) keyboard and a blocking socket, you now have two processes.
Sockets can be set non-blocking, pipes (via Win32::Pipe) cannot.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: poe/win32/fork/threads chat-application
by Moron (Curate) on May 16, 2007 at 12:27 UTC |