Lines Matching refs:__state_
538 unsigned __state_;
552 __assoc_sub_state() : __state_(0) {}
556 {return (__state_ & __constructed) || (__exception_ != nullptr);}
561 bool __has_future_attached = (__state_ & __future_attached) != 0;
565 __state_ |= __future_attached;
569 void __set_deferred() {__state_ |= deferred;}
573 bool __is_ready() const {return (__state_ & ready) != 0;}
601 if (__state_ & deferred)
603 while (!(__state_ & ready) && _Clock::now() < __abs_time)
605 if (__state_ & ready)
652 if (this->__state_ & base::__constructed)
671 this->__state_ |= base::__constructed | base::ready;
688 this->__state_ |= base::__constructed;
747 this->__state_ |= base::__constructed | base::ready;
759 this->__state_ |= base::__constructed;
792 if (this->__state_ & base::__constructed)
1086 __assoc_state<_Rp>* __state_;
1107 future() _NOEXCEPT : __state_(nullptr) {}
1111 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1134 void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1138 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
1141 void wait() const {__state_->wait();}
1146 {return __state_->wait_for(__rel_time);}
1151 {return __state_->wait_until(__abs_time);}
1156 : __state_(__state)
1158 __state_->__attach_future();
1169 if (__state_)
1170 __state_->__release_shared();
1177 unique_ptr<__shared_count, __release_shared_count> __(__state_);
1178 __assoc_state<_Rp>* __s = __state_;
1179 __state_ = nullptr;
1186 __assoc_state<_Rp&>* __state_;
1207 future() _NOEXCEPT : __state_(nullptr) {}
1211 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1234 void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1238 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
1241 void wait() const {__state_->wait();}
1246 {return __state_->wait_for(__rel_time);}
1251 {return __state_->wait_until(__abs_time);}
1256 : __state_(__state)
1258 __state_->__attach_future();
1264 if (__state_)
1265 __state_->__release_shared();
1272 unique_ptr<__shared_count, __release_shared_count> __(__state_);
1273 __assoc_state<_Rp&>* __s = __state_;
1274 __state_ = nullptr;
1281 __assoc_sub_state* __state_;
1302 future() _NOEXCEPT : __state_(nullptr) {}
1306 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1329 void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1333 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
1336 void wait() const {__state_->wait();}
1341 {return __state_->wait_for(__rel_time);}
1346 {return __state_->wait_until(__abs_time);}
1364 __assoc_state<_Rp>* __state_;
1367 explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
1377 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1401 void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1423 : __state_(new __assoc_state<_Rp>)
1437 __state_ = _VSTD::addressof(*__hold.release());
1443 if (__state_)
1445 if (!__state_->__has_value() && __state_->use_count() > 1)
1446 __state_->set_exception(make_exception_ptr(
1449 __state_->__release_shared();
1457 if (__state_ == nullptr)
1459 return future<_Rp>(__state_);
1466 if (__state_ == nullptr)
1468 __state_->set_value(__r);
1477 if (__state_ == nullptr)
1479 __state_->set_value(_VSTD::move(__r));
1489 if (__state_ == nullptr)
1491 __state_->set_exception(__p);
1498 if (__state_ == nullptr)
1500 __state_->set_value_at_thread_exit(__r);
1509 if (__state_ == nullptr)
1511 __state_->set_value_at_thread_exit(_VSTD::move(__r));
1521 if (__state_ == nullptr)
1523 __state_->set_exception_at_thread_exit(__p);
1531 __assoc_state<_Rp&>* __state_;
1534 explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
1545 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1569 void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1585 : __state_(new __assoc_state<_Rp&>)
1599 __state_ = _VSTD::addressof(*__hold.release());
1605 if (__state_)
1607 if (!__state_->__has_value() && __state_->use_count() > 1)
1608 __state_->set_exception(make_exception_ptr(
1611 __state_->__release_shared();
1619 if (__state_ == nullptr)
1621 return future<_Rp&>(__state_);
1628 if (__state_ == nullptr)
1630 __state_->set_value(__r);
1638 if (__state_ == nullptr)
1640 __state_->set_exception(__p);
1647 if (__state_ == nullptr)
1649 __state_->set_value_at_thread_exit(__r);
1657 if (__state_ == nullptr)
1659 __state_->set_exception_at_thread_exit(__p);
1667 __assoc_sub_state* __state_;
1670 explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
1682 : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
1706 void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
1729 __state_ = _VSTD::addressof(*__hold.release());
2064 bool valid() const _NOEXCEPT {return __p_.__state_ != nullptr;}
2081 if (__p_.__state_ == nullptr)
2083 if (__p_.__state_->__has_value())
2103 if (__p_.__state_ == nullptr)
2105 if (__p_.__state_->__has_value())
2193 bool valid() const _NOEXCEPT {return __p_.__state_ != nullptr;}
2210 if (__p_.__state_ == nullptr)
2212 if (__p_.__state_->__has_value())
2233 if (__p_.__state_ == nullptr)
2235 if (__p_.__state_->__has_value())
2374 __assoc_state<_Rp>* __state_;
2378 shared_future() _NOEXCEPT : __state_(nullptr) {}
2380 shared_future(const shared_future& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
2381 {if (__state_) __state_->__add_shared();}
2384 shared_future(future<_Rp>&& __f) _NOEXCEPT : __state_(__f.__state_)
2385 {__f.__state_ = nullptr;}
2387 shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
2388 {__rhs.__state_ = nullptr;}
2403 const _Rp& get() const {return __state_->copy();}
2406 void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
2410 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
2413 void wait() const {__state_->wait();}
2418 {return __state_->wait_for(__rel_time);}
2423 {return __state_->wait_until(__abs_time);}
2429 if (__state_)
2430 __state_->__release_shared();
2437 if (__rhs.__state_)
2438 __rhs.__state_->__add_shared();
2439 if (__state_)
2440 __state_->__release_shared();
2441 __state_ = __rhs.__state_;
2448 __assoc_state<_Rp&>* __state_;
2452 shared_future() _NOEXCEPT : __state_(nullptr) {}
2454 shared_future(const shared_future& __rhs) : __state_(__rhs.__state_)
2455 {if (__state_) __state_->__add_shared();}
2458 shared_future(future<_Rp&>&& __f) _NOEXCEPT : __state_(__f.__state_)
2459 {__f.__state_ = nullptr;}
2461 shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
2462 {__rhs.__state_ = nullptr;}
2477 _Rp& get() const {return __state_->copy();}
2480 void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
2484 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
2487 void wait() const {__state_->wait();}
2492 {return __state_->wait_for(__rel_time);}
2497 {return __state_->wait_until(__abs_time);}
2503 if (__state_)
2504 __state_->__release_shared();
2511 if (__rhs.__state_)
2512 __rhs.__state_->__add_shared();
2513 if (__state_)
2514 __state_->__release_shared();
2515 __state_ = __rhs.__state_;
2522 __assoc_sub_state* __state_;
2526 shared_future() _NOEXCEPT : __state_(nullptr) {}
2528 shared_future(const shared_future& __rhs) : __state_(__rhs.__state_)
2529 {if (__state_) __state_->__add_shared();}
2532 shared_future(future<void>&& __f) _NOEXCEPT : __state_(__f.__state_)
2533 {__f.__state_ = nullptr;}
2535 shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
2536 {__rhs.__state_ = nullptr;}
2551 void get() const {__state_->copy();}
2554 void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
2558 bool valid() const _NOEXCEPT {return __state_ != nullptr;}
2561 void wait() const {__state_->wait();}
2566 {return __state_->wait_for(__rel_time);}
2571 {return __state_->wait_until(__abs_time);}