Compounds | |
class | Barrier |
Programmable fence object. More... | |
class | Cond |
Class implementing a condition variable. More... | |
class | Counter |
Syncrhonizable counter. More... | |
class | FastCondition |
Fast mutex + condition structure wrapper. More... | |
class | MoaningThread |
A thread subclass supporting an arbitrary number of joiners. More... | |
class | Mutex |
Implements a very fast, non reentrant mutex. More... | |
class | RCondition |
Reentrant mutex + condition structure wrapper. More... | |
class | Referenced |
Shared object between threads implementing reference count and self-cancelation. More... | |
class | RMutex |
This is a reentrant mutex with spinlock. More... | |
class | RRWMutex |
This is an advanced (and fully reentrant) read/write mutex. More... | |
class | RWMutex |
This is a read/write mutex. More... | |
class | Subscription |
subscribe/notify model abstraction. More... | |
class | Thread |
Implements the abstraction of a thread. More... | |
Functions | |
bool | Sleep (long seconds, long nanoseconds) |
Sleeps a certain amount of time. | |
bool | Sleep (double seconds) |
Sleeps a certain amount of time. | |
void | s_ThreadCleanupper (void *param) |
Function used (internally) to invoke thread->cleanup() in case of cancelation. | |
void * | s_ThreadRunFunc (void *param) |
Function used (internally) to invoke thread->run(). | |
Counter | runningThreads (1) |
Counter of currently active (or near-to-be active) threads. | |
Counter | startedThreads (1) |
Incremental counter of started threads. | |
Variables | |
Counter | runningThreads |
Counter of currently active (or near-to-be active) threads. | |
Counter | startedThreads |
Incremental counter of started threads. |
All the wefts classes and functions are available under Wefts namespce; they are rather thread specific, so if you are using Wefts++ alone, without any other threading library, you will be pretty safe in adding:
#include <wefts.h> using namespace Wefts;
Otherwise, you will have to prefix all Wefts++ calls with the namespace:
#include <wefts.h> int main( int argc, char *argv[] ) { //sleeping a while.. Wefts::Sleep( 1.5 ); }
|
Counter of currently active (or near-to-be active) threads. Initialized to 1: if we initialized it, the main thread is running... |
|
Function used (internally) to invoke thread->cleanup() in case of cancelation.
|
|
Function used (internally) to invoke thread->run().
|
|
Sleeps a certain amount of time. Sleeps for a given amount of seconds (1.0 meaning one second, 0.5 half second and so on). The process calling this function will be awaken as soon as possible as the time is elapsed; this could also result in a noticeable delay. Also, it is possible that the process is awaken before the wait is elapsed; this may happen if a signal is issued to the process that is currently helding waiting threads.
|
|
Sleeps a certain amount of time. Sleeps for a given amount of seconds (that may be also 0), and of nanoseconds (up to 999,999,999, almost one second). The process calling this function will be awaken as soon as possible as the time is elapsed; this could also result in a noticeable delay. Also, it is possible that the process is awaken before the wait is elapsed; this may happen if a signal is issued to the process that is currently helding waiting threads.
|
|
Incremental counter of started threads. It is used just in internal thread ID count for debugging or reporting purposes |
|
Counter of currently active (or near-to-be active) threads. Initialized to 1: if we initialized it, the main thread is running... |
|
Incremental counter of started threads. It is used just in internal thread ID count for debugging or reporting purposes |