Condition variables?

downs default_357-line at yahoo.de
Sat Sep 29 23:04:50 PDT 2007


Janice Caron wrote:
> On 9/30/07, downs <default_357-line at yahoo.de> wrote:
>> What does one need condition variables for?
>> I'm honestly curious. I've written a few multithreaded programs in D
>> and, so far, haven't needed them :)
> 
> I would guess you're a Windows programmer?
> 
Started out on linux, but all my D code runs cross-platform.

> You don't need them in Windows. Windows has plenty of other mechanisms
> for doing synchronisation. Condition variables is "the linux way".
> 
Yes, but I still don't see what thread synch you need them for that
can't be done in a few lines of synchronized() code.

> Still, I've never really got the hang of them either, so I'd love for
> David to explain further.
> 
> In any case, I don't think they could be put into Phobos except as a
> wrapper around pthreads ... which doesn't exist on Windows. Oh what
> joy.
Joy! ;)

 --downs



More information about the Digitalmars-d mailing list