Monday, 9 September 2013

concurrent select from named pipe

concurrent select from named pipe

Say i have a fifo (named pipe) which gets open multiple times from
multiple processes or threads. All of them will call select() for read
concurrently. If a writer comes in and writes, say one byte to this fifo,
will all blocked select() calls return simultaneously or will only one
thread be chosen and return from select()?
Is there any specification on this or would this be system-dependent?
The reason i m asking is that i want to implement Windows-like manual
reset events using fifos. Manual reset event requires that when event is
signaled, all waiting threads will be released (not just one as for
auto-reset event).
I could use pthread conds for this, but my requirement is for events to be
shared by multiple processes.
Thanks.

No comments:

Post a Comment