
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 24 March 2008 12:13 pm, Phil Endecott wrote:
The Lockable that I have is a Lockable< array<int,100> >. I need something like a Lockable<int> to pass to the function, because the function is only interested in part of the protected data. I want some way to reference the "parent" Lockable's mutex and a portion of its data (element of array, field of a struct etc.)
Oh, I see now. So you would want something along the lines of a pointer/reference-like Lockable that has a constructor which can take a reference (or maybe a shared_ptr) to an already existing mutex. Is there some way to make it possible to use boost::bind for this? So you could bind together a Lockable and a function returns a reference to the object you're interested in, and then use it later to create a scoped_lock/lock_acquirer? - -- Frank -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFH5+mX5vihyNWuA4URApyLAKCm0SFKEp4kdcuOnpTtixosY9xS/wCeOlGY MTt/KdxNusTJZOzx1HGSTKQ= =NpCo -----END PGP SIGNATURE-----