|
Boost : |
From: Matt Hurd (matt.hurd_at_[hidden])
Date: 2005-01-05 06:38:05
> Is there any other functionality that should be added? Specifically,
> is it sufficient to enforce that singletons are created in a specific
> order before main and destroyed in the reverse order after main (using
> dependency instances), or should I provide some way to support
> alternate lifetimes (ex: create on first reference to instance)?
>
> Is there any interest in adding this library to Boost?
Would be good for boost to have a neat singleton. Check out Loki's
and the recentish discussions in the archives regarding threading
issues, particularly w.r.t. the double checked locking pattern for
singletons. An optimised singleton implementation in boost would
probably make use of portable fencing for concurrency. There is quite
a bit more to a singleton pattern to cover most uses.
matt.
matthurd_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk