Thread overview | |||||
---|---|---|---|---|---|
|
February 09, 2007 condition variable/semaphore/etc | ||||
---|---|---|---|---|
| ||||
Since D has the synchronized keyword in the language, implementing simple mutexes and/or critical sections are straightforward and trivial. However, I have not found thus far any language (or phobos class) implementing something like a condition variable. Am I just missing it? It's certainly possible, as I am just now being able to dive down into D. CondVars (or, more easily, counting semaphores, which are useful in some situations that condvars are) are of course implementable by anyone based on a Mutex primitive, but it seems like they would be a good addition to the library. |
February 09, 2007 Re: condition variable/semaphore/etc | ||||
---|---|---|---|---|
| ||||
Posted in reply to Howard Berkey | Howard Berkey wrote: > Since D has the synchronized keyword in the language, implementing simple mutexes > and/or critical sections are straightforward and trivial. However, I have not found > thus far any language (or phobos class) implementing something like a > condition variable. There isn't one in Phobos. Tango has a locks package in the works which contains semaphores, condvars, read/write locks, and a few other things though, IIRC. If all goes as planned it should be in the next release. Sean |
February 09, 2007 Re: condition variable/semaphore/etc | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | That is what I had thought. Thanks.
Sean Kelly Wrote:
> Howard Berkey wrote:
> > Since D has the synchronized keyword in the language, implementing simple mutexes and/or critical sections are straightforward and trivial. However, I have not found
> > thus far any language (or phobos class) implementing something like a
> > condition variable.
>
> There isn't one in Phobos. Tango has a locks package in the works which contains semaphores, condvars, read/write locks, and a few other things though, IIRC. If all goes as planned it should be in the next release.
>
>
> Sean
|
Copyright © 1999-2021 by the D Language Foundation