| 396 | } |
| 397 | |
| 398 | constexpr void start() & noexcept |
| 399 | { |
| 400 | STDEXEC_TRY |
| 401 | { |
| 402 | if (!!__state_) |
| 403 | { |
| 404 | std::unique_lock __guard{__state_->__mutex_}; |
| 405 | if (__state_->__data_.index() != 0) |
| 406 | { |
| 407 | __guard.unlock(); |
| 408 | __complete_(); |
| 409 | } |
| 410 | else |
| 411 | { |
| 412 | __state_->__subscribers_.push_back(this); |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | STDEXEC_CATCH_ALL |
| 417 | { |
| 418 | STDEXEC::set_error(static_cast<_Receiver&&>(__rcvr_), std::current_exception()); |
| 419 | } |
| 420 | } |
| 421 | }; |
| 422 |