atomic operations for shared_ptr ?
Jonathan Wakely
jwakely.gcc@gmail.com
Sat Aug 24 19:26:00 GMT 2013
On 24 August 2013 19:58, Bronek Kozicki wrote:
> On 24/08/2013 18:51, Jonathan Wakely wrote:
>>
>> On 24 August 2013 18:45, Bronek Kozicki wrote:
>>>
>>>
>>> what are the current plans for supporting atomic_* free functions for
>>> shared_ptr, as defined in C++11 (20.6.2 "Header <memory> synopsis")?
>>> These
>>> would be very useful for passing shared_ptr objects between threads, esp.
>>> if
>>> there are multiple readers and single writer.
>>
>>
>> I've been thinking about it recently and am probably just going to
>> implement it with a single global mutex used for all shared_ptr
>> instances.
>
>
>
> erm, but that would be even worse than using mutexes as in my example code
> ....
It would perform badly, yes, but would mean the feature would not stay
unimplemented!
More information about the Libstdc++
mailing list