| 42 | } |
| 43 | |
| 44 | void async_condition_variable::verify_await_params(const std::shared_ptr<executor>& resume_executor, const scoped_async_lock& lock) { |
| 45 | if (!static_cast<bool>(resume_executor)) { |
| 46 | throw std::invalid_argument(details::consts::k_async_condition_variable_await_invalid_resume_executor_err_msg); |
| 47 | } |
| 48 | |
| 49 | if (!lock.owns_lock()) { |
| 50 | throw std::invalid_argument(details::consts::k_async_condition_variable_await_lock_unlocked_err_msg); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | lazy_result<void> async_condition_variable::await_impl(std::shared_ptr<executor> resume_executor, scoped_async_lock& lock) { |
| 55 | co_await details::cv_awaiter(*this, lock); |