lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
Public Member Functions
lean::concurrent::spin_lock< Counter > Class Template Reference

Implements a simple binary spin lock that is NOT reentrant. More...

#include <spin_lock.h>

Inherits noncopyable.

List of all members.

Public Member Functions

 spin_lock ()
 Constructs a binary spin lock.
LEAN_INLINE bool try_lock ()
 Tries to lock this spin lock, returning false if currenty locked by another user.
LEAN_INLINE void lock ()
 Locks this spin lock, returning immediately on success, otherwise waiting for the lock to become unlocked.
LEAN_INLINE void unlock ()
 Unlocks this spin lock, permitting waiting threads to continue execution.

Detailed Description

template<class Counter = long>
class lean::concurrent::spin_lock< Counter >

Implements a simple binary spin lock that is NOT reentrant.


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