KiCad PCB EDA Suite
LOCKABLE Class Reference

#include <lockable.h>

Inheritance diagram for LOCKABLE:
CONNECTIVITY_DATA

Public Member Functions

 LOCKABLE ()
 
 ~LOCKABLE ()
 
void Lock ()
 
void Unlock ()
 
bool TryLock ()
 

Private Attributes

std::mutex m_lock
 

Detailed Description

Definition at line 31 of file lockable.h.

Constructor & Destructor Documentation

LOCKABLE::LOCKABLE ( )
inline

Definition at line 34 of file lockable.h.

34 {};
LOCKABLE::~LOCKABLE ( )
inline

Definition at line 35 of file lockable.h.

35 {};

Member Function Documentation

void LOCKABLE::Lock ( )
inline

Definition at line 37 of file lockable.h.

References m_lock.

38  {
39  m_lock.lock();
40  }
std::mutex m_lock
Definition: lockable.h:53
bool LOCKABLE::TryLock ( )
inline

Definition at line 47 of file lockable.h.

References m_lock.

48  {
49  return m_lock.try_lock();
50  }
std::mutex m_lock
Definition: lockable.h:53
void LOCKABLE::Unlock ( )
inline

Definition at line 42 of file lockable.h.

References m_lock.

43  {
44  m_lock.unlock();
45  }
std::mutex m_lock
Definition: lockable.h:53

Member Data Documentation

std::mutex LOCKABLE::m_lock
private

Definition at line 53 of file lockable.h.

Referenced by Lock(), TryLock(), and Unlock().


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