Anope IRC Services  Version 2.0
Public Member Functions | Protected Attributes
Mutex Class Reference

#include <threadengine.h>

Inheritance diagram for Mutex:
Inheritance graph
[legend]

Public Member Functions

 Mutex ()
 
 ~Mutex ()
 
void Lock ()
 
void Unlock ()
 
bool TryLock ()
 

Protected Attributes

pthread_mutex_t mutex
 

Detailed Description

Definition at line 67 of file threadengine.h.

Constructor & Destructor Documentation

◆ Mutex()

Mutex::Mutex ( )

Constructor

Definition at line 94 of file threadengine.cpp.

References pthread_mutex_init().

◆ ~Mutex()

Mutex::~Mutex ( )

Destructor

Definition at line 99 of file threadengine.cpp.

References pthread_mutex_destroy().

Member Function Documentation

◆ Lock()

void Mutex::Lock ( )

◆ TryLock()

bool Mutex::TryLock ( )

Attempt to lock the mutex, will return true on success and false on fail Does not block

Returns
true or false

Definition at line 114 of file threadengine.cpp.

References pthread_mutex_trylock().

◆ Unlock()

void Mutex::Unlock ( )

Field Documentation

◆ mutex

pthread_mutex_t Mutex::mutex
protected

Definition at line 71 of file threadengine.h.

Referenced by Condition::Wait().


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