Boost logo

Boost :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-05-30 09:45:03


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

On Friday 30 May 2008 06:40 am, Anthony Williams wrote:
> > It would also be possible, I think, to make an adapter that actually
> > creates a shared mutex from a normal one. I've never had to write a
> > read/write mutex but I guess that this is how they are implemented
> > internally.
>
> It's a bit more complicated than that. boost::shared_mutex is
> implemented on top of boost::mutex and boost::condition_variable for
> pthreads: take a look.

Hmm, so it looks like it would be straightforward to convert the pthread
implementation of shared_mutex into an adapter that can convert an arbitrary
mutex type (conforming to the boost.thread Lockable concept) into a shared
mutex, by turning its boost::mutex into a template type?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIQATi5vihyNWuA4URAtDSAJ44PVA1aGFm8m8StlSXukwUi3nw2gCfQnkm
p0RpVNNKfpnvaA0EHT1CDj0=
=DFq3
-----END PGP SIGNATURE-----


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk