Open Search
    ScopedARWWriteLock Class Reference

    #include <arwlock.h>

    Detailed Description

    The ScopedARWWriteLock class acquires a write lock to the specified mutex upon creation and releases this upon destruction (usually at the end of a code block. This simplifies cases where your code contains many return statements where you'd otherwise have to manually unlock before returning. Only use ScopedARWWriteLock for a short block of your code. Do not use ScopedARWWriteLock mindlessly at the beginning of a function! This will block all other threads for the whole runtime of the function which usually is much longer that required.

    THREADSAFE.

    Public Member Functions

     ScopedARWWriteLock (ARWLock &lock)
     
     ScopedARWWriteLock (ScopedARWWriteLock &&src)
     
     ~ScopedARWWriteLock ()
     

    Private Member Functions

     MAXON_DISALLOW_COPY_AND_ASSIGN (ScopedARWWriteLock)
     

    Private Attributes

    ARWLock_lock
     

    Constructor & Destructor Documentation

    ◆ ScopedARWWriteLock() [1/2]

    ScopedARWWriteLock ( ARWLock lock)
    explicit

    ◆ ScopedARWWriteLock() [2/2]

    ◆ ~ScopedARWWriteLock()

    Member Function Documentation

    ◆ MAXON_DISALLOW_COPY_AND_ASSIGN()

    MAXON_DISALLOW_COPY_AND_ASSIGN ( ScopedARWWriteLock  )
    private

    Member Data Documentation

    ◆ _lock

    ARWLock* _lock
    private