On 2/16/10, Robert Klemme <shortcutter / googlemail.com> wrote:
> 2010/2/15 Caleb Clausen <vikkous / gmail.com>:
>> It depends on what you're using the semaphore for. If it's to be used
>> for locking, you're right. If it's a signaling semaphore, then 0 for
>> the init value is exactly what's needed.
>
> Right you are.  Although I'd say that a condition variable is probably
> a better tool for that.

It may be, but I've never understood condition variables properly.
They seem to be semaphores with some additional semantics but it never
made enough sense to me that I felt I could use them with
confidence... the docs never helped. I was raised on semphores, and
that's all I know. :) If you actually understand condition variables
and how to use them, could you kindly explain them to me? I would be
grateful.