From: Don G (dongryphon_at_[hidden])
Date: 2005-01-02 19:13:23
I just joined the mailing list, so please pardon me for (and educate
me on) failed points of etiquette. You all have done some fine work!
I may be worried over something inconsequential, but the condition
class creates three kernel objects per instance. Granted, one would
have to instantiate hundreds of these objects to notice a problem,
but STL collections make such things trivial. For example, in a
previous job one of our teams created a large, in-memory database
that had a mutex/condvar on lots of objects. I guess that I am
concerned by the non-portable "cost of use" equation (say vs.
pthreads). One could write code that was perfectly reasonable on Unix
and quite terrible on Windows.
Some years ago I also implemented a condvar on Win32, but the
technique I used required only one event per thread (a CondVar was
nothing more than a list of stack structures guarded by the
In the FWIW category, I could see no benefit (and lots of pain)
binding the condvar to the mutex at the time of wait(), so in my
implementation a condvar was permantently bound to its mutex (as in
"condvar::condvar(mutex & m)"). I have yet to find a case where the
posix-style, free association was needed.
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk