|
Boost : |
From: Andy Glew (glew_at_[hidden])
Date: 2000-01-07 10:43:55
Now that Aleksey et al have shown me how to create pre and post
methods using temporary values, I think that this shows a possible
resolution to (a) Boris Fomitchev's suggestion that shared_ptr<>
have a template parameter indicating synchronization,
and (b) Beman Dawes' reluctance to allow yet another template
parameter.
Boris should be made happy by mutexed< shared_ptr<T> >,
with implicit locking to make all accesses atomic.
If the default implementation of mutexed<T> is too slow
for shared_ptr<T>, then it can be specialized.
Beman's objection that the synchronized and unsynchronized
versions are different types is still valid --- shared_ptr<T>
and mutexed< shared_ptr<T> > *are* different types.
The usual issues about conversions apply.
--- Andy "Krazy" Glew, glew_at_[hidden], UW Madison and Intel. DISCLAIMER: private posting, not representative of university or Intel. Please respond by email in addition to replying to newsgroup.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk