ESPHome  2024.11.3
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 576 of file helpers.h.

Constructor & Destructor Documentation

◆ LockGuard()

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

Definition at line 578 of file helpers.h.

◆ ~LockGuard()

esphome::LockGuard::~LockGuard ( )
inline

Definition at line 579 of file helpers.h.


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