cygthread::cygthread() hang

Christopher Faylor
Mon Apr 14 13:35:00 GMT 2003

On Mon, Apr 14, 2003 at 07:31:37AM -0400, Joe Buehler wrote:
>Christopher Faylor wrote:
>>>Is there any way to avoid them?  For example, on a pipe read, does
>>>Windows have something like select() so that the reader thread can wait
>>>for a "terminate yourself" or a "data can be read from the pipe"
>>If there was something like that, don't you think I'd be using it
>>rather than this kludge?  I instituted this change after all of the
>>complaints about pipe reads being slow.  This sped up reads but at the
>>expense of using TerminateThread, with all that entails.
>Is there something wrong with using ReadFileEx and WriteFileEx to do
>overlapped I/O?  The main thread can then use WaitForMultipleObjects
>and wait for signals OR I/O completion on the pipe (signalled by the
>callback routine).

How would you create a pipe with the FILE_FLAG_OVERLAPPED option as
is specified here:

I really have thought about this.  Rather than have you offer obvious
suggestions and me essentially say "Yes, I've thought about this", maybe
a simple test case illustrating your idea would be best.


More information about the Cygwin-developers mailing list