This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Various Windows (mingw32) additions, mostly relating to select or serial ports


Daniel Jacobowitz <drow@false.org> writes:

> The one I'm least proud of is pipes - there does not appear to be a way to
> sleep and have the OS wake you when data is available on a pipe.  So I poll
> every 10ms in a thread.  Yuck!  The other three all have subtly different
> wait mechanisms.

Why do you have to poll?  You should be able to have a thread which
just sleeps on reading the pipe.  When the thread reads something, it
can signal the main thread, passing it the character which it read.

The cleanest portable event loop which I know of is Tcl.  The Tcl code
has solved pretty much all the event loop issues for Unix, Windows,
and MacOS 9.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]