OpenThreads
Condition
Go to the documentation of this file.
1/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14
15//
16// Condition - C++ condition class
17// ~~~~~~~~~
18//
19
20#ifndef _OPENTHREADS_CONDITION_
21#define _OPENTHREADS_CONDITION_
22
23#include <OpenThreads/Exports>
24#include <OpenThreads/Mutex>
25
26namespace OpenThreads {
27
33
34public:
35
40
44 virtual ~Condition();
45
49 virtual int wait(Mutex *mutex);
50
56 virtual int wait(Mutex *mutex, unsigned long int ms);
57
63 virtual int signal();
64
70 virtual int broadcast();
71
72private:
73
77 Condition(const Condition &/*c*/) {};
78
82 Condition &operator=(const Condition &/*c*/) {return *(this);};
83
87 void *_prvData;
88
89};
90
91}
92
93#endif // !_OPENTHREADS_CONDITION_
#define OPENTHREAD_EXPORT_DIRECTIVE
Definition Exports:20
Definition Affinity:26
This class provides an object-oriented thread condition interface.
Definition Condition:32
virtual int wait(Mutex *mutex)
Wait on a mutex.
virtual int signal()
Signal a SINGLE thread to wake if it's waiting.
virtual int broadcast()
Wake all threads waiting on this condition.
virtual ~Condition()
Destructor.
virtual int wait(Mutex *mutex, unsigned long int ms)
Wait on a mutex for a given amount of time (ms)
Condition()
Constructor.
This class provides an object-oriented thread mutex interface.
Definition Mutex:31

osg logo
Generated at Wed Jul 23 2025 00:00:00 for the OpenThreads by doxygen 1.14.0.