Boost logo

Boost Users :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2007-01-30 16:29:37


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 30 January 2007 12:54 pm, Frank Mori Hess wrote:
> I'm curious why the boost::condition class requires a seperate mutex
> object to be created, and a corresponding scoped lock argument passed to
> the wait functions. Wouldn't it be easier to just keep a mutex inside
> the condition object and automatically lock it at the beginning of the
> wait functions? What am I missing here?

Ah, nevermind. I remember now sometimes you want to do:

1) lock
2) launch thread that will lock then notify
3) wait

- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFv7jB5vihyNWuA4URApoMAKCU4hWxherIjm13GiHWHtOpqF1D7ACg2/gY
bU/Q2s5C1v6FZCyyupQq/dc=
=/tYS
-----END PGP SIGNATURE-----


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net