24 #ifndef _CORE_THREADING_INTERRUPTIBLE_BARRIER_H_
25 #define _CORE_THREADING_INTERRUPTIBLE_BARRIER_H_
27 #include <core/threading/barrier.h>
28 #include <core/utils/refptr.h>
32 class InterruptibleBarrierData;
42 bool wait(
unsigned int timeout_sec,
unsigned int timeout_nanosec);
63 InterruptibleBarrierData *data_;
68 bool wait_at_barrier_;
69 int num_threads_in_wait_function_;
A barrier is a synchronization tool which blocks until a given number of threads have reached the bar...
unsigned int count()
Get number of threads this barrier will wait for.
A barrier is a synchronization tool which blocks until a given number of threads have reached the bar...
void reset()
Clears the barrier.
virtual void wait()
Wait for other threads.
void interrupt()
Interrupt the barrier.
InterruptibleBarrier(unsigned int count)
Constructor.
virtual ~InterruptibleBarrier()
Destructor.
bool no_threads_in_wait()
Checks if there are no more threads in the wait() function.
RefPtr< ThreadList > passed_threads()
Get a list of threads that passed the barrier.
Mutex mutual exclusion lock.
RefPtr<> is a reference-counting shared smartpointer.
Fawkes library namespace.