uvw 2.12.1
Loading...
Searching...
No Matches
uvw::Barrier Class Referencefinal

The Barrier wrapper. More...

#include <thread.h>

Inheritance diagram for uvw::Barrier:
Collaboration diagram for uvw::Barrier:

Public Member Functions

bool wait () noexcept
 Synchronizes at a barrier.
 
- Public Member Functions inherited from uvw::UnderlyingType< Barrier, uv_barrier_t >
Looploop () const noexcept
 Gets the loop from which the resource was originated.
 
const uv_barrier_t * raw () const noexcept
 Gets the underlying raw data structure.
 
uv_barrier_t * raw () noexcept
 Gets the underlying raw data structure.
 

Additional Inherited Members

- Static Public Member Functions inherited from uvw::UnderlyingType< Barrier, uv_barrier_t >
static std::shared_ptr< Barriercreate (Args &&...args)
 Creates a new resource of the given type.
 
- Protected Member Functions inherited from uvw::UnderlyingType< Barrier, uv_barrier_t >

Detailed Description

The Barrier wrapper.

To create a Barrier through a Loop, arguments follow:

  • An unsigned integer that specifies the number of threads that must call wait before any of them successfully return from the call. The value specified must be greater than zero.

Definition at line 334 of file thread.h.

Member Function Documentation

◆ wait()

bool uvw::Barrier::wait ( )
noexcept

Synchronizes at a barrier.

Returns
True in case of success, false otherwise.

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