Sep 01, 2009 18:37
thread_safety::unsafe means that *copying* AND all mutation
operations on shared_ptr/weak_ptr copies (all pointing to the
same object; "typed-null" including) shall be *synchronized*;
otherwise, the behavior is undefined. Read-only stuff (copying
aside) can be done concurrently.
thread_safety::basic means that all "const" operations
(including copying) can be done concurrently, but mutations
shall be synchronized; otherwise, the behavior is undefined.
thread_safety::strong means "do-whatever-you-want-and-don't-
care-about-synchronization" (i.e. you can also mutate shared_ptr
and weak_ptr objects *concurrently* without any synchronization
because it's fully synchronized "internally").
boost shared/weak pointers support only thread_safety::basic,
copy operation is *not* const.
c++,
memento