• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

ThreadWeaver

Classes | Enumerations | Functions | Variables
ThreadWeaver Namespace Reference

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

enum ThreadWeaver::StateId

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.

Definition at line 48 of file State.h.

Function Documentation

void ThreadWeaver::debug ( int  severity,
const char *  cformat,
  ... 
)
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.

void ThreadWeaver::debug ( bool  condition,
int  severity,
const char *  cformat,
  ... 
)
inline

Prints the message to the console if condition is true.

Definition at line 125 of file DebuggingAids.h.

bool ThreadWeaver::invariant ( )
inline

Definition at line 142 of file DebuggingAids.h.

void ThreadWeaver::setDebugLevel ( bool  debug,
int  level 
)
inline

Set the debug log level.

See also
debug

Definition at line 105 of file DebuggingAids.h.

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.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ThreadWeaver

Skip menu "ThreadWeaver"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal