ESPHome 2026.4.3
Loading...
Searching...
No Matches
esphome::Mutex Class Reference

Mutex implementation, with API based on the unavailable std::mutex. More...

#include <helpers.h>

Public Member Functions

 Mutex (const Mutex &)=delete
 
Mutexoperator= (const Mutex &)=delete
 
 Mutex ()=default
 
 ~Mutex ()=default
 
void lock ()
 
bool try_lock ()
 
void unlock ()
 
 Mutex ()
 
 ~Mutex ()=default
 
void lock ()
 
bool try_lock ()
 
void unlock ()
 

Detailed Description

Mutex implementation, with API based on the unavailable std::mutex.

Note
This mutex is non-recursive, so take care not to try to obtain the mutex while it is already taken.

Definition at line 2021 of file helpers.h.

Constructor & Destructor Documentation

◆ Mutex() [1/3]

esphome::Mutex::Mutex ( const Mutex & )
delete

◆ Mutex() [2/3]

esphome::Mutex::Mutex ( )
default

Definition at line 35 of file helpers.cpp.

◆ ~Mutex() [1/2]

esphome::Mutex::~Mutex ( )
default

Definition at line 36 of file helpers.cpp.

◆ Mutex() [3/3]

esphome::Mutex::Mutex ( )
inline

Definition at line 2035 of file helpers.h.

◆ ~Mutex() [2/2]

esphome::Mutex::~Mutex ( )
default

Member Function Documentation

◆ lock() [1/2]

void esphome::Mutex::lock ( )
inline

Definition at line 2030 of file helpers.h.

◆ lock() [2/2]

void esphome::Mutex::lock ( )
inline

Definition at line 2037 of file helpers.h.

◆ operator=()

Mutex & esphome::Mutex::operator= ( const Mutex & )
delete

◆ try_lock() [1/2]

bool esphome::Mutex::try_lock ( )
inline

Definition at line 2031 of file helpers.h.

◆ try_lock() [2/2]

bool esphome::Mutex::try_lock ( )
inline

Definition at line 2038 of file helpers.h.

◆ unlock() [1/2]

void esphome::Mutex::unlock ( )
inline

Definition at line 2032 of file helpers.h.

◆ unlock() [2/2]

void esphome::Mutex::unlock ( )
inline

Definition at line 2039 of file helpers.h.


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