>> the problem with semaphores is that Unix/POSIX semantics don't allow
>> integration of a process sleeping on an file descriptor and a
>> semaphore (one of the few areas where Windows definitely improves upon
>> Unix). this would mean adding yet another thread that just sleeps on
>> the semaphore used to drive the "process" callback. Not terrible, but
>> not particularly great either. The code would be a little cleaner, but
>> we'd have an extra thread for every client. Uhm.
>
>Seems like a high price to pay, would the code really be cleaner?

It does seem like a high price to pay. And the code is only cleaner in
the library, where nobody really cares once it works.

It would be so nice if poll(2) worked on semaphores, eh?

--p

Reply via email to