XDispatch 0.6.1
Public Types | Static Public Member Functions
QDispatch Class Reference

Single Instance Interface to control the dispatch behaviour. More...

#include <QtDispatch/qdispatch.h>

List of all members.

Public Types

enum  Priority { HIGH, DEFAULT, LOW }
 Three priority classes used for the three standard global queues. More...

Static Public Member Functions

static QDispatchQueue mainQueue ()
 Returns the main queue.
static QDispatchQueue globalQueue (Priority p=DEFAULT)
 Returns the global queue associated to the given Priority p.
static QDispatchQueue currentQueue ()
static dispatch_time_t asDispatchTime (const QTime &)
static QTime asQTime (dispatch_time_t t)

Detailed Description

Single Instance Interface to control the dispatch behaviour.

Use this object to create new queues, get one of the main or global queues.

When using this object from within a QRunnable executed on a queue you can also use it to get the queue you're running in.

For information about the Dispatch mechanism, please also see Apple's documentation on libDispatch.

Definition at line 49 of file qdispatch.h.


Member Enumeration Documentation

Three priority classes used for the three standard global queues.

Enumerator:
HIGH 
DEFAULT 
LOW 

Definition at line 57 of file qdispatch.h.


Member Function Documentation

static dispatch_time_t QDispatch::asDispatchTime ( const QTime &  ) [static]
Returns:
The given QTime converted to a dispatch_time_t
static QTime QDispatch::asQTime ( dispatch_time_t  t) [static]
Remarks:
Please be careful when using this converter as a QTime is tracking 24 hours max, whereas a dispatch_time_t can hold way more. This additional time will be cropped while converting.
Returns:
The given dispatch_time_t as QTime
static QDispatchQueue QDispatch::currentQueue ( ) [static]
Returns:
The queue the currently active runnable (or block) is executed in.
static QDispatchQueue QDispatch::globalQueue ( Priority  p = DEFAULT) [static]

Returns the global queue associated to the given Priority p.

Runnables submitted to these global concurrent queues may be executed concurrently with respect to each other.

static QDispatchQueue QDispatch::mainQueue ( ) [static]

Returns the main queue.

This is the queue running within the Qt Event Loop. Thus only items put on this queue can change the GUI.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Thu Apr 12 2012 09:50:43 for XDispatch by Doxygen 1.7.4
© 2010-2012 MLBA (about | privacy) All Rights reserved.