ESPHome 2026.5.0-dev
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 2036 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 2050 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 2045 of file helpers.h.

◆ lock() [2/2]

void esphome::Mutex::lock ( )
inline

Definition at line 2052 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 2046 of file helpers.h.

◆ try_lock() [2/2]

bool esphome::Mutex::try_lock ( )
inline

Definition at line 2053 of file helpers.h.

◆ unlock() [1/2]

void esphome::Mutex::unlock ( )
inline

Definition at line 2047 of file helpers.h.

◆ unlock() [2/2]

void esphome::Mutex::unlock ( )
inline

Definition at line 2054 of file helpers.h.


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