4 Sep
2009
4 Sep
'09
2:31 p.m.
Stefan,
On Thu, Sep 3, 2009 at 2:30 AM, Stefan Strasser
why would you even need a lock here? the shared_ptr doc says that you can expect the same thread safety from shared_ptr as you can from built-in types. you can use multiple-readers-single-writer without any locks on built-in types.
You can? Is assigning to a char or a double guaranteed to be atomic? How can the compiler guarantee that? -- What if there is some architecture for which it's not a single instruction assignment? Kevin