Public Member Functions | Private Attributes | List of all members
XCondition Class Reference

condition class. More...

#include <xthread.h>

Inheritance diagram for XCondition:
Inheritance graph
[legend]

Public Member Functions

int wait (int usec=0)
 
void signal ()
 
void broadcast ()
 
- Public Member Functions inherited from XMutex
void lock ()
 
void unlock ()
 
bool trylock ()
 

Private Attributes

QWaitCondition m_cond
 
pthread_cond_t m_cond
 

Additional Inherited Members

- Protected Attributes inherited from XMutex
QMutex m_mutex
 
pthread_mutex_t m_mutex
 

Detailed Description

condition class.

Definition at line 94 of file xthread.h.

Member Function Documentation

void XCondition::broadcast ( )

wake-up all waiting threads.

See Also
signal()

Definition at line 49 of file xthread.cpp.

void XCondition::signal ( )

wake-up at most one thread.

See Also
broadcast()

Definition at line 45 of file xthread.cpp.

int XCondition::wait ( int  usec = 0)

Lock me before calling me. go asleep until signal is emitted.

Parameters
usecif non-zero, timeout occurs after usec.
Returns
zero if locked thread is waked up.

Definition at line 36 of file xthread.cpp.


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

Generated for KAME4 by  doxygen 1.8.3