
On Monday 14 January 2008 12:10 pm, John Torjo wrote:
|- boost::mutexed_singleton| : additionally ensures that concurrent access to the instance is mutually exclusive. In other words, only one thread can access the instance at a given time.
This seems like a combination of two independent ideas: a singleton and a monitor. I'd rather see independent monitor object support in boost, then the user could combine them as desired (or not, as monitors certainly don't have to be singletons). I've recently implemented two boost-licensed monitor classes, one pointer-like, and one value-like. See: http://www.comedi.org/projects/libpoet/boostbook/doc/boostbook/html/poet/mon... This isn't a real review, I just wanted to comment on the mutexed_singleton concept. I'm really more interested in the monitor aspect than the singleton (I always have to remind myself what the rationale is for using a singleton when I find myself writing one). -- Frank