MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / verify_await_params

Method verify_await_params

source/threads/async_condition_variable.cpp:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void 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
54lazy_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);

Callers

nothing calls this directly

Calls 1

owns_lockMethod · 0.80

Tested by

no test coverage detected