chsvlib
chsv helper source code

◆ barrier()

barrier ( std::ptrdiff_t  count,
CompletionFunction  on_completion = CompletionFunction() 
)
explicitnoexcept

Constructs a barrier associated with a specified number of threads to wait at synchronization points and optionally with a specified completion routine.

Parameters
countA number of threads to wait at synchronization points specified with the constructed barrier. The behaviour is undefined for negative values of count. If the value is zero, the constructed barrier cannot be used for blocking synchronization.
on_completionA functional object called by the constructed barrier upon its openings.