Turi Create  4.0
turi::padded_simple_spinlock Class Reference

#include <core/parallel/pthread_tools.hpp>

Public Member Functions

 padded_simple_spinlock ()
 constructs a spinlock
 
 padded_simple_spinlock (const padded_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 155 of file pthread_tools.hpp.

Constructor & Destructor Documentation

◆ padded_simple_spinlock()

turi::padded_simple_spinlock::padded_simple_spinlock ( const padded_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 170 of file pthread_tools.hpp.


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