|
Boost : |
From: Puneet Jain (pjaini_at_[hidden])
Date: 2005-02-12 21:07:23
I am a new user of boost pointers and was wondering
about the thread safety in boost shared and intrusive
pointers.
After reading some eariler posts and the current
documentation, I am little confused. As per current
documentation shared pointers thread safety in shared
pointers is on the lines of STL and thus they are not
thread safe for writing. But I am pretty sure I read
in one of the posts that shared pointer is thread safe
for all operations. Also, looking at the operator= and
swap, it seems there could be some thread safety
issues.
Also, I have my own counted_base which I use in
intrusive pointer. If my understanding is correct, to
ensure thread safety, if I ensure add_ref and
release_ref operations are atomic, I am pretty much
covering all the bases.
Thanks,
Pete
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk