ESPHome  2024.11.0
Public Member Functions
esphome::LockGuard Class Reference

Helper class that wraps a mutex with a RAII-style API. More...

#include <helpers.h>

Public Member Functions

 LockGuard (Mutex &mutex)
 
 ~LockGuard ()
 

Detailed Description

Helper class that wraps a mutex with a RAII-style API.

This behaves like std::lock_guard: as long as the object is alive, the mutex is held.

Definition at line 568 of file helpers.h.

Constructor & Destructor Documentation

◆ LockGuard()

esphome::LockGuard::LockGuard ( Mutex mutex)
inline

Definition at line 570 of file helpers.h.

◆ ~LockGuard()

esphome::LockGuard::~LockGuard ( )
inline

Definition at line 571 of file helpers.h.


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