digitalmars.D.learn - condition variable/semaphore/etc
- Howard Berkey (3/3) Feb 09 2007 Since D has the synchronized keyword in the language, implementing simpl...
- Sean Kelly (5/9) Feb 09 2007 There isn't one in Phobos. Tango has a locks package in the works which...
- Howard Berkey (2/14) Feb 09 2007
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.
Feb 09 2007
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
Feb 09 2007
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 acondition 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
Feb 09 2007