Increase number of expected completions by one.
Increase number of completions by one.
Mark one completion and wait for all other completions to happen.
Wait for all completion events to happen.
Report whether there are any fibers we might be waiting for
Report how many fibers we are waiting for
A cross fibers synchronization point.
Barrier has several deployment methods. The basic idea is to divide the fibers into those who need to "check in", and those that wait for the check in counter to reach the correct amount.
The most common use case is waiting for launched fibers to finish. To facilitate this mode, the following code structure is used: