hpx::distributed::latch
hpx::distributed::latch#
Defined in header hpx/latch.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
Top level HPX namespace.
-
namespace distributed
Functions
-
explicit latch(std::ptrdiff_t count)#
Initialize the latch
Requires: count >= 0. Synchronization: None Postconditions: counter_ == count.
-
latch(hpx::id_type const &id)#
Extension: Create a client side representation for the existing server::latch instance with the given global id id.
-
latch(hpx::future<hpx::id_type> &&f)#
Extension: Create a client side representation for the existing server::latch instance with the given global id id.
Extension: Create a client side representation for the existing server::latch instance with the given global id id.
-
void count_down_and_wait()#
Decrements counter_ by 1 . Blocks at the synchronization point until counter_ reaches 0.
Requires: counter_ > 0.
Synchronization: Synchronizes with all calls that block on this latch and with all is_ready calls on this latch that return true.
- Throws
Nothing. –
-
void arrive_and_wait()#
Decrements counter_ by update . Blocks at the synchronization point until counter_ reaches 0.
Requires: counter_ > 0.
Synchronization: Synchronizes with all calls that block on this latch and with all is_ready calls on this latch that return true.
- Throws
Nothing. –
-
void count_down(std::ptrdiff_t n)#
Decrements counter_ by n. Does not block.
Requires: counter_ >= n and n >= 0.
Synchronization: Synchronizes with all calls that block on this latch and with all is_ready calls on this latch that return true .
- Throws
Nothing. –
-
bool is_ready() const noexcept#
Returns: counter_ == 0. Does not block.
- Throws
Nothing. –
-
bool try_wait() const noexcept#
Returns: counter_ == 0. Does not block.
- Throws
Nothing. –
-
explicit latch(std::ptrdiff_t count)#
-
namespace distributed