Provides an interface for representing a dispatch queue and methods that can be called to modify or use the queue. More...
Public Slots | |
void | suspend () |
Suspends the invocation of work items on this queue. | |
void | resume () |
Resumes the invocation of work items on this queue. | |
Public Member Functions | |
QDispatchQueue (const QString &label) | |
QDispatchQueue (const char *) | |
QDispatchQueue (dispatch_queue_t) | |
QDispatchQueue (const xdispatch::queue &) | |
QDispatchQueue (const QDispatchQueue &) | |
~QDispatchQueue () | |
virtual void | async (QRunnable *) |
Applies the given QRunnable for async execution in this queue and returns immediately. | |
virtual void | apply (QIterationRunnable *, int times) |
Applies the given QRunnable for async execution in this queue and returns immediately. | |
virtual void | after (QRunnable *, const QTime &time) |
Applies the given QRunnable for async execution in this queue after the given time and returns immediately. | |
virtual void | after (QRunnable *, dispatch_time_t time) |
virtual void | after (dispatch_block_t, const QTime &time) |
Same as after(). | |
virtual void | sync (QRunnable *) |
Applies the given QRunnable for execution int his queue and blocks until the QRunnable was executed. | |
virtual void | setFinalizer (QRunnable *, const xdispatch::queue &=xdispatch::global_queue()) |
Sets the given runnable as finalizer for this queue. | |
virtual void | setFinalizer (xdispatch::operation *, const xdispatch::queue &=xdispatch::global_queue()) |
virtual void | setFinalizer (dispatch_block_t, const xdispatch::queue &=xdispatch::global_queue()) |
virtual void | setTarget (const xdispatch::queue &) |
Sets the target queue of this queue, i.e. | |
QDispatchQueue & | operator= (const QDispatchQueue &) |
Provides an interface for representing a dispatch queue and methods that can be called to modify or use the queue.
Read Apple's documentation of libDispatch to understand the concept of tasks and queues.
QDispatchQueue::QDispatchQueue | ( | const QString & | label | ) |
QDispatchQueue::QDispatchQueue | ( | const char * | ) |
QDispatchQueue::QDispatchQueue | ( | dispatch_queue_t | ) |
QDispatchQueue::QDispatchQueue | ( | const xdispatch::queue & | ) |
QDispatchQueue::QDispatchQueue | ( | const QDispatchQueue & | ) |
QDispatchQueue::~QDispatchQueue | ( | ) |
virtual void QDispatchQueue::after | ( | QRunnable * | , |
const QTime & | time | ||
) | [virtual] |
Applies the given QRunnable for async execution in this queue after the given time and returns immediately.
time | The time to wait until the QRunnable is applied to the queue. |
virtual void QDispatchQueue::after | ( | QRunnable * | , |
dispatch_time_t | time | ||
) | [virtual] |
virtual void QDispatchQueue::after | ( | dispatch_block_t | , |
const QTime & | time | ||
) | [virtual] |
Same as after().
Will wrap the given block in a QRunnable and put it on the queue.
virtual void QDispatchQueue::apply | ( | QIterationRunnable * | , |
int | times | ||
) | [virtual] |
Applies the given QRunnable for async execution in this queue and returns immediately.
In case the autoDelete() flag of the passed QIterationRunnable is set to true it is ensured that the runnable will be deleted after being executed the requested number of times
times | The number of times the QRunnable will be executed |
virtual void QDispatchQueue::async | ( | QRunnable * | ) | [virtual] |
Applies the given QRunnable for async execution in this queue and returns immediately.
QDispatchQueue& QDispatchQueue::operator= | ( | const QDispatchQueue & | ) |
void QDispatchQueue::resume | ( | ) | [virtual, slot] |
Resumes the invocation of work items on this queue.
Calls to suspend() must be balanced with calls to resume().
Reimplemented from xdispatch::queue.
virtual void QDispatchQueue::setFinalizer | ( | dispatch_block_t | , |
const xdispatch::queue & | = xdispatch::global_queue() |
||
) | [virtual] |
virtual void QDispatchQueue::setFinalizer | ( | xdispatch::operation * | , |
const xdispatch::queue & | = xdispatch::global_queue() |
||
) | [virtual] |
virtual void QDispatchQueue::setFinalizer | ( | QRunnable * | , |
const xdispatch::queue & | = xdispatch::global_queue() |
||
) | [virtual] |
Sets the given runnable as finalizer for this queue.
A finalizer is called before destroying a queue, i.e. if all QDispatchQueue objects representing the queue were deleted and all pending work on a queue was dispatched.
virtual void QDispatchQueue::setTarget | ( | const xdispatch::queue & | ) | [virtual] |
Sets the target queue of this queue, i.e.
the queue all items of this queue will be dispatched on in turn.
void QDispatchQueue::suspend | ( | ) | [virtual, slot] |
Suspends the invocation of work items on this queue.
A suspended queue will not invoke any blocks associated with it. The suspension of a queue will occur after any running work item associated with the queue completes.
Calls to suspend() must be balanced with calls to resume().
Reimplemented from xdispatch::queue.
virtual void QDispatchQueue::sync | ( | QRunnable * | ) | [virtual] |
Applies the given QRunnable for execution int his queue and blocks until the QRunnable was executed.