Class auto_mutex

Synopsis

#include <include/EASTL/internal/thread_support.h>

class EASTL_API auto_mutex

Description

auto_mutex

Inheritance

Decsendents: shared_ptr_auto_mutex

Methods

auto_mutex overload
~auto_mutex
operator=

Source

Lines 208-222 in include/EASTL/internal/thread_support.h.

class EASTL_API auto_mutex
{
public:
    EA_FORCE_INLINE auto_mutex(mutex& mutex) : pMutex(&mutex)
        { pMutex->lock(); }
    EA_FORCE_INLINE ~auto_mutex()
        { pMutex->unlock(); }
protected:
    mutex* pMutex;
    auto_mutex(const auto_mutex&) = delete;
    void operator=(const auto_mutex&) = delete;
};





Add Discussion as Guest

Log in