2
0
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:
Oliver Kowalke
2013-12-29 11:32:25 +01:00
parent 67ca128a8f
commit bc87dc3415

View File

@@ -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_;