Turi Create  4.0
turi::simple_spinlock Class Reference

#include <core/parallel/pthread_tools.hpp>

Public Member Functions

 simple_spinlock ()
 constructs a spinlock
 
 simple_spinlock (const simple_spinlock &)
 
void lock () const
 Acquires a lock on the spinlock.
 
void unlock () const
 Releases a lock on the spinlock.
 
bool try_lock () const
 Non-blocking attempt to acquire a lock on the spinlock.
 

Detailed Description

If pthread spinlock is not implemented, this provides a simple alternate spin lock implementation.

Before you use, see parallel_object_intricacies.

Definition at line 107 of file pthread_tools.hpp.

Constructor & Destructor Documentation

◆ simple_spinlock()

turi::simple_spinlock::simple_spinlock ( const simple_spinlock )
inline

Copy constructor which does not copy. Do not use! Required for compatibility with some STL implementations (LLVM). which use the copy constructor for vector resize, rather than the standard constructor.

Definition at line 121 of file pthread_tools.hpp.


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