Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Concurrent Data Structures (Was: Concurrent Containers)

0 views
Skip to first unread message

Alexander Terekhov

unread,
Sep 2, 2010, 7:40:09 PM9/2/10
to
Think of thread-safety akin to C++ exception-safety with three levels:

thread_safety::unsafe means that even "const" copying and all other
const and non-const operations on a data structure and its copies
shall be synchronized; otherwise, the behavior is undefined. Read-only
(very strong/real const) stuff can be done concurrently.

thread_safety::basic means that all "const" operations can be done
concurrently, but mutations shall be synchronized with respect to
"const" operations and other mutations; 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 instances
without any synchronization because it's all fully synchronized
internally).

regards,
alexander.

0 new messages