ESPHome  2024.4.1
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 558 of file helpers.h.

Constructor & Destructor Documentation

◆ LockGuard()

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

Definition at line 560 of file helpers.h.

◆ ~LockGuard()

esphome::LockGuard::~LockGuard ( )
inline

Definition at line 561 of file helpers.h.


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