23#include <fmt/format.h>
44 if (num_waiting_threads < 2U) {
46 "Invalid number of threads to wait in WindowsSyncBarrier.");
48 BOOL result = InitializeSynchronizationBarrier(
49 &barrier_,
static_cast<LONG
>(num_waiting_threads), -1);
50 if (result == FALSE) {
52 "Failed to initialize WindowsSyncBarrier (error code: {}).",
60 void wait()
override { EnterSynchronizationBarrier(&barrier_, 0); }
72 SYNCHRONIZATION_BARRIER barrier_{};
Class of exceptions in this library.
Class of barriers to synchronize threads using synchronization barriers in Windows.
void wait() override
Wait for other threads.
~WindowsSyncBarrier() override
Destructor.
WindowsSyncBarrier(std::size_t num_waiting_threads)
Constructor.
Namespace of utility functions and classes.
Namespace of stat_bench source codes.
Definition of StatBenchException class.
Definition of SyncBarrier class.