| 128 | } |
| 129 | |
| 130 | void manual_executor::wait_for_tasks_impl(size_t count) { |
| 131 | if (count == 0) { |
| 132 | if (shutdown_requested()) { |
| 133 | details::throw_runtime_shutdown_exception(name); |
| 134 | } |
| 135 | return; |
| 136 | } |
| 137 | |
| 138 | std::unique_lock<decltype(m_lock)> lock(m_lock); |
| 139 | m_condition.wait(lock, [this, count] { |
| 140 | return (m_tasks.size() >= count) || m_abort; |
| 141 | }); |
| 142 | |
| 143 | if (m_abort) { |
| 144 | details::throw_runtime_shutdown_exception(name); |
| 145 | } |
| 146 | |
| 147 | assert(m_tasks.size() >= count); |
| 148 | } |
| 149 | |
| 150 | size_t manual_executor::wait_for_tasks_impl(size_t count, std::chrono::time_point<std::chrono::system_clock> deadline) { |
| 151 | deadline += std::chrono::milliseconds(1); |
nothing calls this directly
no test coverage detected