#include <yateclass.h>
Inheritance diagram for Thread:

Public Types | |
| enum | Priority { Lowest, Low, Normal, High, Highest } |
Public Member Functions | |
| virtual void | cleanup () |
| bool | startup () |
| bool | error () const |
| bool | running () const |
| int | locks () const |
| bool | locked () const |
| const char * | name () const |
| void | cancel (bool hard=false) |
| bool | isCurrent () const |
Static Public Member Functions | |
| static const char * | currentName () |
| static void | yield (bool exitCheck=false) |
| static void | sleep (unsigned int sec, bool exitCheck=false) |
| static void | msleep (unsigned long msec, bool exitCheck=false) |
| static void | usleep (unsigned long usec, bool exitCheck=false) |
| static Thread * | current () |
| static int | count () |
| static bool | check (bool exitNow=true) |
| static void | exit () |
| static Priority | priority (const char *name, Priority defvalue=Normal) |
| static const char * | priority (Priority prio) |
| static void | killall () |
| static void | preExec () |
Protected Member Functions | |
| Thread (const char *name=0, Priority prio=Normal) | |
| Thread (const char *name, const char *prio) | |
| virtual | ~Thread () |
Friends | |
| class | ThreadPrivate |
| class | MutexPrivate |
A thread is a separate execution context that exists in the same address space. Threads make better use of multiple processor machines and allow blocking one execution thread while allowing other to run.
|
|
Running priorities, their mapping is operating system dependent |
|
||||||||||||
|
Creates and starts a new thread
|
|
||||||||||||
|
Creates and starts a new thread
|
|
|
The destructor is called when the thread terminates |
|
|
Terminates the specified thread.
|
|
|
Check if the current thread was asked to terminate.
|
|
|
This method is called when the current thread terminates. Reimplemented in Router. |
|
|
Get the number of Yate created threads
|
|
|
Get a pointer to the currently running thread
|
|
|
Get the name of the currently running thread
|
|
|
Check if the thread creation failed
|
|
|
Terminates the current thread. |
|
|
Check if this thread is the currently running thread
|
|
|
Kills all other running threads. Ouch! Must be called from the main thread or it does nothing. |
|
|
Check if the thread is currently helding or attempting to lock a mutex
|
|
|
Count how many Yate mutexes are kept locked by this thread
|
|
||||||||||||
|
Sleep for a number of milliseconds
|
|
|
Get the name of this thread
|
|
|
On some platforms this method kills all other running threads. Must be called after fork() but before any exec*() call. |
|
|
Convert a priority level to a textual name
|
|
||||||||||||
|
Convert a priority name to a thread priority level
|
|
|
Check if the thread is running or not
|
|
||||||||||||
|
Sleep for a number of seconds
|
|
|
Actually starts running the new thread which lingers after creation
|
|
||||||||||||
|
Sleep for a number of microseconds
|
|
|
Give up the currently running timeslice. Note that on some platforms it also sleeps for the operating system's scheduler resolution
|
1.4.4