mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-19 02:12:24 +00:00
use atomics for intrusive_ptr of shared_state
This commit is contained in:
@@ -276,7 +276,7 @@ template< typename R >
|
||||
class shared_state< R & > : public noncopyable
|
||||
{
|
||||
private:
|
||||
std::size_t use_count_;
|
||||
atomic< std::size_t > use_count_;
|
||||
mutable mutex mtx_;
|
||||
mutable condition waiters_;
|
||||
bool ready_;
|
||||
@@ -467,7 +467,7 @@ template<>
|
||||
class shared_state< void > : public noncopyable
|
||||
{
|
||||
private:
|
||||
std::size_t use_count_;
|
||||
atomic< std::size_t > use_count_;
|
||||
mutable mutex mtx_;
|
||||
mutable condition waiters_;
|
||||
bool ready_;
|
||||
|
||||
Reference in New Issue
Block a user