ThreadWeaver
Classes | |
class | DependencyPolicy |
class | DestructedState |
class | InConstructionState |
class | Job |
class | JobCollection |
class | JobCollectionJobRunner |
class | JobRunHelper |
class | JobSequence |
class | QueuePolicy |
class | ResourceRestrictionPolicy |
class | ShuttingDownState |
class | State |
class | StateImplementation |
class | SuspendedState |
class | SuspendingState |
class | Thread |
class | Weaver |
class | WeaverImpl |
class | WeaverInterface |
class | WeaverObserver |
class | WorkingHardState |
Enumerations | |
enum | StateId { InConstruction = 0, WorkingHard, Suspending, Suspended, ShuttingDown, Destructed, NoOfStates } |
Functions | |
void | debug (int severity, const char *cformat,...) |
void | debug (bool condition, int severity, const char *cformat,...) |
bool | invariant () |
void | setDebugLevel (bool debug, int level) |
Variables | |
bool | Debug = true |
int | DebugLevel = 01 |
QMutex | GlobalMutex |
Enumeration Type Documentation
All weaver objects maintain a state of operation which can be queried by the application.
See the threadweaver documentation on how the different states are related.
State is not part of the published API.
Enumerator | |
---|---|
InConstruction |
The object is in the state of construction and has not yet started to process jobs. |
WorkingHard |
Jobs are being processed. |
Suspending |
Job processing is suspended, but some jobs which where already in progress are not finished yet. |
Suspended |
Job processing is suspended, and no jobs are being processed. |
ShuttingDown |
The object is being destructed. Jobs might still be processed, the destructor will wait for all threads to exit and then end. |
Destructed |
The object is being destructed, and all threads have exited. No jobs are handled anymore. |
NoOfStates |
Not a state, but a sentinel for the number of defined states. |
Function Documentation
|
inline |
This method prints a text message on the screen, if debugging is enabled.
Otherwise, it does nothing. The message is thread safe, therefore providing that the messages appear in the order they where issued by the different threads. All messages are suppressed when Debug is false. All messages with a lower importance (higher number) than DebugLevel will be suppressed, too. Debug level 0 messages will always be printed as long as Debug is true. We use our own debugging method, since debugging threads is a more complicated experience than debugging single threaded contexts. This might change in future in the way that debug prints its messages to another logging facility provided by the platform. Use setDebugLevel () to integrate adapt debug () to your platform.
Definition at line 112 of file DebuggingAids.h.
|
inline |
Prints the message to the console if condition is true.
Definition at line 125 of file DebuggingAids.h.
|
inline |
Definition at line 142 of file DebuggingAids.h.
|
inline |
Variable Documentation
bool ThreadWeaver::Debug = true |
Definition at line 38 of file DebuggingAids.cpp.
int ThreadWeaver::DebugLevel = 01 |
Definition at line 39 of file DebuggingAids.cpp.
QMutex ThreadWeaver::GlobalMutex |
A global mutex for the ThreadWeaver objects.
Generally, you should not use it in your own code.
Definition at line 37 of file DebuggingAids.cpp.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.