Wait for test-runners to be completed. * * Important: may only be called once by a single thread! */
| 346 | * Important: may only be called once by a single thread! |
| 347 | */ |
| 348 | void await_test_runners_completed() { |
| 349 | #ifndef NDEBUG |
| 350 | bool some_waiting = |
| 351 | #endif |
| 352 | execution_done_wait_started.exchange(true); |
| 353 | assert(some_waiting == false && "Only one thread is allowed to await the result"); |
| 354 | execution_done_event.wait(); |
| 355 | } |
| 356 | private: |
| 357 | /// Set flag that failure has occurred. |
| 358 | void set_failure() { |
no test coverage detected