From: Stephen D. <sd...@gm...> - 2012-01-28 18:03:52
|
On Sat, Jan 28, 2012 at 1:26 PM, Zoran Vasiljevic <zv...@ar...> wrote: > > On Windows there are some limitations as how you can > do non-blocking operations... In particular, there > seems to be a problem with non-blocking reads/writes > on unnamed pipes... They simply do not work on windows, > at least as to our knowledge. I don't know anything about Windows, but i t looks like PIPE_NOWAIT switches to non-blocking mode but is a legacy of ye olde lan manager, and instead you should use overlapped IO with the FILE_FLAG_OVERLAPPED flag: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365788%28v=vs.85%29.aspx This is all with named pipes. But it says the followinf about anon pipes: Anonymous pipes are implemented using a named pipe with a unique name. Therefore, you can often pass a handle to an anonymous pipe to a function that requires a handle to a named pipe. So maybe you can substitute a named pipe with the appropriate flags for the anon pipe? |