24#ifndef LIBTHREADAR_BARRIER_HPP
25#define LIBTHREADAR_BARRIER_HPP
97 static std::string used_implementation()
99#if HAVE_PTHREAD_BARRIER_T
100 return "pthread_barrier_t";
102 return "pthread_cond_t";
108 unsigned int waiting_num;
110#if HAVE_PTHREAD_BARRIER_T
111 pthread_barrier_t bar;
the class barrier allows several threads to synchronize between them
~barrier() noexcept(false)
The destructor.
void wait()
suspend the calling thread waiting for other up to 'num' other thread to call wait too
barrier(barrier &&ref) noexcept=default
no move constructor
barrier(unsigned int num)
The constructor.
unsigned int get_count() const
return the barrier size
barrier & operator=(const barrier &ref)=delete
no assignment operator
unsigned int get_waiting_count() const
return the number of thread waiting on the barrier or just released from it
barrier(const barrier &ref)=delete
no copy constructor
defines the condition class
This is the only namespace used in libthreadar and all symbols provided by libthreadar are member of ...