Turi Create  4.0
turi::cancellable_barrier Class Reference

#include <core/parallel/pthread_tools.hpp>

Public Member Functions

 cancellable_barrier (size_t numthreads)
 Construct a barrier which will only fall when numthreads enter.
 
void cancel ()
 
void wait () const
 Wait on the barrier until numthreads has called wait.
 

Detailed Description

This is a simple sense-reversing barrier implementation. In addition to standard barrier functionality, this also provides a "cancel" function which can be used to destroy the barrier, releasing all threads stuck in the barrier.

Before you use, see parallel_object_intricacies.

Definition at line 721 of file pthread_tools.hpp.

Member Function Documentation

◆ cancel()

void turi::cancellable_barrier::cancel ( )
inline
Warning
: This barrier is safely NOT reusable with this cancel definition

Definition at line 757 of file pthread_tools.hpp.


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