You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Christian Jaeger <ch...@sl.ethz.ch> on 2000/11/11 18:09:17 UTC
(OT) Semaphore/signalling question
What's the best way to unlock several sister processes waiting for an
event at once? I just want to tell "now it's ready, go on". An idea
would be to use normal unix signals, but there are only 32 of them
(aren't there?) and their management would be rather complicated. I'm
looking for something like semaphores instead. The problem with
semaphores is that I don't see a way to release *several* waiting
processes at once. $n= $sem->getncnt(XX); $sem->op(XX, $n) to
increment the count for all waiting processes does not work when one
process is faster (in a loop) than the others and gets away
everything before the others are unlocked.
Are (unix domain) sockets the right thing for this?
Thanks
Christian.