mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-18 14:02:18 +00:00
use atomics for intrusive_ptr of shared_state
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/atomic.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/exception_ptr.hpp>
|
||||
#include <boost/intrusive_ptr.hpp>
|
||||
@@ -36,7 +37,7 @@ template< typename R >
|
||||
class shared_state : 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