Modify

Opened 4 years ago

Last modified 4 years ago

#9314 new Feature Requests

boost shared_ptr should use C++11 atomics when available

Reported by: anonymous Owned by: Peter Dimov
Milestone: To Be Determined Component: smart_ptr
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

If a native assembly lock-free version is unavailable, boost should use native C++11 atomics if the library has them. This will far more reliably pick an efficient implementation for shared_ptr in cases where the optimized assembly version is unavailable and where sync support may be unavailable/not detected properly.

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by viboes

Component: Nonesmart_ptr
Owner: set to Peter Dimov

comment:2 Changed 4 years ago by Peter Dimov

https://github.com/boostorg/smart_ptr/commit/fed15ad8c50921cbfc0365156e4e4f4454dc1b91 adds support for #define BOOST_SP_USE_STD_ATOMIC which forces std::atomic to be used. This will eventually become the default when std::atomic is autodetected to be present and working.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Peter Dimov.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.