Condition variables?

Janice Caron caron800 at googlemail.com
Sat Sep 29 22:55:33 PDT 2007


On 9/30/07, David Brown <dlang at davidb.org> wrote:
> It's really hard to do
> non-trivial thread programming without this kind of synchronization.

When I first tried to do thread programming on Linux I was baffled by
the absence of Events or anything similar. But surely, I said, it's
really hard to do non-trivial thread programming without this kind of
synchronization. Aha!, I was told, Linux has these things called
condition variables instead. (I still haven't quite got the hang of
them as I'm basically a Windows person).


> I'm just kind of wondering why std.thread even exists without
> condition variables, since it really isn't useful for all that much,
> by itself, and doesn't seem to even have the needed hooks to implement
> any other mechanism.

Yes, I certainly agree that std.thread is limited - it doesn't have
condition variables /or/ Events, and surely you need one or the other?

For that matter it doesn't even have mutexes (unless you count the
ones built into every Object, and they're not necessarily the right
tool for every job).



More information about the Digitalmars-d mailing list