You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a chance to have a non thread-safe shared_ptr in the standard?
I was thinking either as a new template or maybe the current shared_ptr should have a template parameter if it's ref counting should be atomic.
There is quite a bit of interest in such a thing - see here
Andrei Alexandrescu talked at the cppcon how to implement such a pointer yourself but I feel the standard should provide one - see here
If facebook are doing it - it must be valuable.
Currently the only publicly available solution seems to be building boost with a flag/define to disable thread-safe reference counting.
It might be also good to have the optimizations that Andrei talks about - for the common case when the ref count only goes to 1 and then to 0.
I've already asked this in the google groups for the c++ standard/discussions and I was told that I should make a proposal but I'm not gonna go that route myself just yet.
The text was updated successfully, but these errors were encountered:
Is there a chance to have a non thread-safe shared_ptr in the standard?
I was thinking either as a new template or maybe the current shared_ptr should have a template parameter if it's ref counting should be atomic.
There is quite a bit of interest in such a thing - see here
Andrei Alexandrescu talked at the cppcon how to implement such a pointer yourself but I feel the standard should provide one - see here
If facebook are doing it - it must be valuable.
Currently the only publicly available solution seems to be building boost with a flag/define to disable thread-safe reference counting.
It might be also good to have the optimizations that Andrei talks about - for the common case when the ref count only goes to 1 and then to 0.
I've already asked this in the google groups for the c++ standard/discussions and I was told that I should make a proposal but I'm not gonna go that route myself just yet.
The text was updated successfully, but these errors were encountered: