
9 May
2006
9 May
'06
9:32 p.m.
Aristid Breitkreuz wrote:
The huge advantage of pipes is that with select, you can poll multiple event sources at once. Multiple sem_wait must be placed into multiple threads, which is probably more overkill for those rare signals than the selfpipe-trick (as they call it).
You are right. For event-driven programs that already run a select/poll loop, adding just another file descriptor is the best thing to do. But for all other cases the two require an equivalent efford. Regards, Stefan