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

#include <threadengine.h>

Inheritance diagram for Mutex:
Inheritance graph

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 ( )


Definition at line 94 of file threadengine.cpp.

References pthread_mutex_init().

◆ ~Mutex()

Mutex::~Mutex ( )


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

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

Definition at line 71 of file threadengine.h.

Referenced by Condition::Wait().

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