Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::IThreadBarrier Class Referenceabstract

Interface of a barrier between threads. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/concurrency/arccore/concurrency/IThreadBarrier.h>

Inheritance diagram for Arcane::IThreadBarrier:
Collaboration diagram for Arcane::IThreadBarrier:

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.

Detailed Description

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.

Member Function Documentation

◆ destroy()

virtual void Arcane::IThreadBarrier::destroy ( )
pure virtual

◆ init()

virtual void Arcane::IThreadBarrier::init ( Integer nb_thread)
pure virtual

◆ wait()

virtual void Arcane::IThreadBarrier::wait ( )
pure virtual

The documentation for this class was generated from the following file: