The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
threading::condition Class Reference

#include <thread.hpp>

Inheritance diagram for threading::condition:
Inheritance graph

Public Types

enum  WAIT_TIMEOUT_RESULT { WAIT_OK, WAIT_TIMED_OUT, WAIT_ERROR }
 

Public Member Functions

 condition ()
 
 ~condition ()
 
bool wait (const mutex &m)
 
WAIT_TIMEOUT_RESULT wait_timeout (const mutex &m, unsigned int timeout)
 
bool notify_one ()
 
bool notify_all ()
 

Private Attributes

SDL_cond *const cond_
 

Detailed Description

Definition at line 141 of file thread.hpp.

Member Enumeration Documentation

enum threading::condition::WAIT_TIMEOUT_RESULT
Enumerator
WAIT_OK 
WAIT_TIMED_OUT 
WAIT_ERROR 

Definition at line 165 of file thread.hpp.

Constructor & Destructor Documentation

threading::condition::condition ( )

Definition at line 100 of file thread.cpp.

threading::condition::~condition ( )

Definition at line 103 of file thread.cpp.

References cond_.

Member Function Documentation

bool threading::condition::notify_all ( )

Definition at line 135 of file thread.cpp.

References cond_, and ERR_G.

Referenced by network_worker_pool::manager::~manager().

bool threading::condition::notify_one ( )
bool threading::condition::wait ( const mutex m)

Definition at line 108 of file thread.cpp.

References cond_, and threading::mutex::m_.

condition::WAIT_TIMEOUT_RESULT threading::condition::wait_timeout ( const mutex m,
unsigned int  timeout 
)

Definition at line 113 of file thread.cpp.

References cond_, ERR_G, threading::mutex::m_, WAIT_ERROR, WAIT_OK, and WAIT_TIMED_OUT.

Referenced by threading::async_operation::execute().

Member Data Documentation

SDL_cond* const threading::condition::cond_
private

Definition at line 190 of file thread.hpp.

Referenced by notify_all(), notify_one(), wait(), wait_timeout(), and ~condition().


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