Twitch SDK (Internal)
Public Member Functions | List of all members
ttv::IMutex Class Referenceabstract

#include <mutex.h>

Inheritance diagram for ttv::IMutex:
ttv::IConditionMutex ttv::StandardMutex ttv::WinMutex ttv::StandardConditionMutex ttv::WinConditionMutex

Public Member Functions

virtual ~IMutex ()
 
virtual TTV_ErrorCode Lock ()=0
 
virtual TTV_ErrorCode TryLock ()=0
 
virtual TTV_ErrorCode Unlock ()=0
 

Detailed Description

Interface for basic mutex lock/unlock functionality.

Constructor & Destructor Documentation

◆ ~IMutex()

virtual ttv::IMutex::~IMutex ( )
virtual

Member Function Documentation

◆ Lock()

virtual TTV_ErrorCode ttv::IMutex::Lock ( )
pure virtual

Block/wait until the mutex is free to take, and then acquire the mutex.

Returns
  • TTV_EC_SUCCESS: Mutex has been successfully acquired.

Implemented in ttv::WinConditionMutex, ttv::StandardConditionMutex, ttv::WinMutex, and ttv::StandardMutex.

◆ TryLock()

virtual TTV_ErrorCode ttv::IMutex::TryLock ( )
pure virtual

Attempt to acquire the mutex, without waiting for the lock to be available.

Returns
  • TTV_EC_SUCCESS: Mutex has been successfully acquired.
  • TTV_WRN_MUTEX_NOT_ACQUIRED: Lock has failed and mutex has not been acquired.

Implemented in ttv::WinConditionMutex, ttv::StandardConditionMutex, ttv::WinMutex, and ttv::StandardMutex.

◆ Unlock()

virtual TTV_ErrorCode ttv::IMutex::Unlock ( )
pure virtual

Release the previously acquired mutex (through Lock()).

Returns
  • TTV_EC_SUCCESS: Mutex has been sucessfully released.

Implemented in ttv::WinConditionMutex, ttv::StandardConditionMutex, ttv::WinMutex, and ttv::StandardMutex.


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