Turi Create
4.0
|
#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. | |
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.
|
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.