Fawkes API
Fawkes Development Version
|
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_;
Mutex mutual exclusion lock.
RefPtr<> is a reference-counting shared smartpointer.
virtual ~InterruptibleBarrier()
Destructor.
void interrupt()
Interrupt the barrier.
RefPtr< ThreadList > passed_threads()
Get a list of threads that passed the barrier.
Fawkes library namespace.
bool no_threads_in_wait()
Checks if there are no more threads in the wait() function.
InterruptibleBarrier(unsigned int count)
Constructor.
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...
A barrier is a synchronization tool which blocks until a given number of threads have reached the bar...
virtual void wait()
Wait for other threads.
void reset()
Clears the barrier.