Interface of a barrier between threads. More...
#include <arccore/concurrency/IThreadBarrier.h>
Public Member Functions | |
| virtual void | init (Integer nb_thread)=0 |
| Initializes the barrier for nb_thread. | |
| virtual void | destroy ()=0 |
| Destroys the barrier. | |
| virtual void | wait ()=0 |
| Blocks and waits until all threads call this method. | |
Interface of a barrier between threads.
Once created (via IThreadImplementation::createBarrier()), the barrier must be initialized via init() for n threads. Then, each thread must call the wait() method to wait until all other threads reach this same point. The barrier can be used multiple times. To destroy the barrier, you must call destroy(). This also frees the instance which should no longer be used.
Definition at line 40 of file arccore/src/concurrency/arccore/concurrency/IThreadBarrier.h.
|
pure virtual |
Destroys the barrier.
Implemented in Arcane::Concurrency::LegacyStdThreadBarrier, Arcane::Concurrency::StdThreadBarrier, and Arcane::GlibThreadBarrier.
|
pure virtual |
Initializes the barrier for nb_thread.
Implemented in Arcane::Concurrency::LegacyStdThreadBarrier, Arcane::Concurrency::StdThreadBarrier, and Arcane::GlibThreadBarrier.
|
pure virtual |
Blocks and waits until all threads call this method.
Implemented in Arcane::Concurrency::LegacyStdThreadBarrier, Arcane::Concurrency::StdThreadBarrier, and Arcane::GlibThreadBarrier.