Subj : Re: pthreads: combine condvar and select To : comp.programming.threads From : Phil Frisbie, Jr. Date : Wed Jan 12 2005 06:18 pm Bernhard Roessmann wrote: > Phil Frisbie, Jr. wrote: > >> You can create a loop-back UDP socket and add it to the other file >> handles. Then a second thread simply sends a small (or even zero >> length) UDP packet to 'wake up' the first thread. > > > Hi Phil, > > or some other sort of unix "standard IPC" mechanism, I know. > But this seems to be much overhead for sending a little "event" to the > thread. > > I'm amazed why pthreads "signaling" is not "select compatible", this > would be very nice an consistent. > > Anyway, seems that I have to use some of the heavier IPC mechanisms for > this :-/ > > BTW: UDP is per definition "unreliable". But I think, UDP over a unix > socket should be reliable, right? Yes, it should not drop packets unless you send so many at once that you fill up the receive buffer on the other end...So for simply signaling another thread you should never have a problem. > Regards, > -- Phil Frisbie, Jr. Hawk Software http://www.hawksoft.com .