Lines Matching refs:__state_
545 unsigned __state_;
559 __assoc_sub_state() : __state_(0) {}
563 {return (__state_ & __constructed) || (__exception_ != nullptr);}
568 bool __has_future_attached = (__state_ & __future_attached) != 0;
572 __state_ |= __future_attached;
576 void __set_deferred() {__state_ |= deferred;}
580 bool __is_ready() const {return (__state_ & ready) != 0;}
608 if (__state_ & deferred)
610 while (!(__state_ & ready) && _Clock::now() < __abs_time)
612 if (__state_ & ready)
651 if (this->__state_ & base::__constructed)
666 this->__state_ |= base::__constructed | base::ready;
679 this->__state_ |= base::__constructed;
738 this->__state_ |= base::__constructed | base::ready;
750 this->__state_ |= base::__constructed;
783 if (this->__state_ & base::__constructed)
1045 __assoc_state<_Rp>* __state_;
1059 future() _NOEXCEPT : __state_(nullptr) {}
1062 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1080 void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1084 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
1087 void wait() const {__state_->wait();}
1092 {return __state_->wait_for(__rel_time);}
1097 {return __state_->wait_until(__abs_time);}
1102 : __state_(__state)
1104 __state_->__attach_future();
1115 if (__state_)
1116 __state_->__release_shared();
1123 unique_ptr<__shared_count, __release_shared_count> __(__state_);
1124 __assoc_state<_Rp>* __s = __state_;
1125 __state_ = nullptr;
1132 __assoc_state<_Rp&>* __state_;
1146 future() _NOEXCEPT : __state_(nullptr) {}
1149 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1167 void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1171 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
1174 void wait() const {__state_->wait();}
1179 {return __state_->wait_for(__rel_time);}
1184 {return __state_->wait_until(__abs_time);}
1189 : __state_(__state)
1191 __state_->__attach_future();
1197 if (__state_)
1198 __state_->__release_shared();
1205 unique_ptr<__shared_count, __release_shared_count> __(__state_);
1206 __assoc_state<_Rp&>* __s = __state_;
1207 __state_ = nullptr;
1214 __assoc_sub_state* __state_;
1228 future() _NOEXCEPT : __state_(nullptr) {}
1231 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1249 void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1253 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
1256 void wait() const {__state_->wait();}
1261 {return __state_->wait_for(__rel_time);}
1266 {return __state_->wait_until(__abs_time);}
1284 __assoc_state<_Rp>* __state_;
1287 explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
1296 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1310 void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1328 : __state_(new __assoc_state<_Rp>)
1342 __state_ = _VSTD::addressof(*__hold.release());
1348 if (__state_)
1350 if (!__state_->__has_value() && __state_->use_count() > 1)
1351 __state_->set_exception(make_exception_ptr(
1354 __state_->__release_shared();
1362 if (__state_ == nullptr)
1364 return future<_Rp>(__state_);
1371 if (__state_ == nullptr)
1373 __state_->set_value(__r);
1380 if (__state_ == nullptr)
1382 __state_->set_value(_VSTD::move(__r));
1390 if (__state_ == nullptr)
1392 __state_->set_exception(__p);
1399 if (__state_ == nullptr)
1401 __state_->set_value_at_thread_exit(__r);
1408 if (__state_ == nullptr)
1410 __state_->set_value_at_thread_exit(_VSTD::move(__r));
1418 if (__state_ == nullptr)
1420 __state_->set_exception_at_thread_exit(__p);
1428 __assoc_state<_Rp&>* __state_;
1431 explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
1441 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1455 void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1471 : __state_(new __assoc_state<_Rp&>)
1485 __state_ = _VSTD::addressof(*__hold.release());
1491 if (__state_)
1493 if (!__state_->__has_value() && __state_->use_count() > 1)
1494 __state_->set_exception(make_exception_ptr(
1497 __state_->__release_shared();
1505 if (__state_ == nullptr)
1507 return future<_Rp&>(__state_);
1514 if (__state_ == nullptr)
1516 __state_->set_value(__r);
1524 if (__state_ == nullptr)
1526 __state_->set_exception(__p);
1533 if (__state_ == nullptr)
1535 __state_->set_value_at_thread_exit(__r);
1543 if (__state_ == nullptr)
1545 __state_->set_exception_at_thread_exit(__p);
1553 __assoc_sub_state* __state_;
1556 explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
1567 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1581 void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1604 __state_ = _VSTD::addressof(*__hold.release());
1928 bool valid() const _NOEXCEPT {return __p_.__state_ != nullptr;}
1945 if (__p_.__state_ == nullptr)
1947 if (__p_.__state_->__has_value())
1967 if (__p_.__state_ == nullptr)
1969 if (__p_.__state_->__has_value())
2043 bool valid() const _NOEXCEPT {return __p_.__state_ != nullptr;}
2060 if (__p_.__state_ == nullptr)
2062 if (__p_.__state_->__has_value())
2083 if (__p_.__state_ == nullptr)
2085 if (__p_.__state_->__has_value())
2218 __assoc_state<_Rp>* __state_;
2222 shared_future() _NOEXCEPT : __state_(nullptr) {}
2224 shared_future(const shared_future& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
2225 {if (__state_) __state_->__add_shared();}
2227 shared_future(future<_Rp>&& __f) _NOEXCEPT : __state_(__f.__state_)
2228 {__f.__state_ = nullptr;}
2230 shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
2231 {__rhs.__state_ = nullptr;}
2243 const _Rp& get() const {return __state_->copy();}
2246 void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
2250 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
2253 void wait() const {__state_->wait();}
2258 {return __state_->wait_for(__rel_time);}
2263 {return __state_->wait_until(__abs_time);}
2269 if (__state_)
2270 __state_->__release_shared();
2277 if (__rhs.__state_)
2278 __rhs.__state_->__add_shared();
2279 if (__state_)
2280 __state_->__release_shared();
2281 __state_ = __rhs.__state_;
2288 __assoc_state<_Rp&>* __state_;
2292 shared_future() _NOEXCEPT : __state_(nullptr) {}
2294 shared_future(const shared_future& __rhs) : __state_(__rhs.__state_)
2295 {if (__state_) __state_->__add_shared();}
2297 shared_future(future<_Rp&>&& __f) _NOEXCEPT : __state_(__f.__state_)
2298 {__f.__state_ = nullptr;}
2300 shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
2301 {__rhs.__state_ = nullptr;}
2313 _Rp& get() const {return __state_->copy();}
2316 void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
2320 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
2323 void wait() const {__state_->wait();}
2328 {return __state_->wait_for(__rel_time);}
2333 {return __state_->wait_until(__abs_time);}
2339 if (__state_)
2340 __state_->__release_shared();
2347 if (__rhs.__state_)
2348 __rhs.__state_->__add_shared();
2349 if (__state_)
2350 __state_->__release_shared();
2351 __state_ = __rhs.__state_;
2358 __assoc_sub_state* __state_;
2362 shared_future() _NOEXCEPT : __state_(nullptr) {}
2364 shared_future(const shared_future& __rhs) : __state_(__rhs.__state_)
2365 {if (__state_) __state_->__add_shared();}
2367 shared_future(future<void>&& __f) _NOEXCEPT : __state_(__f.__state_)
2368 {__f.__state_ = nullptr;}
2370 shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
2371 {__rhs.__state_ = nullptr;}
2383 void get() const {__state_->copy();}
2386 void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
2390 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
2393 void wait() const {__state_->wait();}
2398 {return __state_->wait_for(__rel_time);}
2403 {return __state_->wait_until(__abs_time);}