absl::BlockingCounter::Wait

Blocks until the counter reaches zero.

Synopsis

Declared in <absl/synchronization/blocking_counter.h>

void
Wait();

Description

Blocks until the counter reaches zero. This function may be called at most once. On return, DecrementCount() will have been called "initial_count" times and the blocking counter may be destroyed.

Memory ordering: For any threads X and Y, any action taken by X before X calls DecrementCount() is visible to Y after Y returns from Wait().