push
github
51 of 64 new or added lines in 5 files covered. (79.69%)
51 existing lines in 4 files now uncovered.1379 of 1632 relevant lines covered (84.5%)
4234968.15 hits per line
| 1 |
#include "coro/sync_wait.hpp" |
|
| 2 |
|
|
| 3 |
namespace coro::detail
|
|
| 4 |
{
|
|
| 5 |
sync_wait_event::sync_wait_event(bool initially_set) : m_set(initially_set)
|
6,000,114✔ |
| 6 |
{
|
|
| 7 |
} |
6,000,114✔ |
| 8 |
|
|
| 9 |
auto sync_wait_event::set() noexcept -> void |
6,000,114✔ |
| 10 |
{
|
|
| 11 |
m_set.exchange(true, std::memory_order::release);
|
6,000,114✔ |
| 12 |
m_cv.notify_all(); |
6,000,114✔ |
| 13 |
} |
6,000,114✔ |
| 14 |
|
|
|
UNCOV
15
|
auto sync_wait_event::reset() noexcept -> void |
× |
| 16 |
{
|
|
|
UNCOV
17
|
m_set.exchange(false, std::memory_order::release);
|
× |
|
UNCOV
18
|
} |
× |
| 19 |
|
|
| 20 |
auto sync_wait_event::wait() noexcept -> void |
6,000,114✔ |
| 21 |
{
|
|
| 22 |
std::unique_lock<std::mutex> lk{m_mutex};
|
6,000,114✔ |
| 23 |
m_cv.wait(lk, [this] { return m_set.load(std::memory_order::acquire); }); |
12,000,305✔ |
| 24 |
} |
6,000,114✔ |
| 25 |
|
|
| 26 |
} // namespace coro::detail
|