ThreadWeaver
9#ifndef THREADWEAVER_QUEUEING_H
10#define THREADWEAVER_QUEUEING_H
12#include "collection.h"
13#include "jobinterface.h"
14#include "jobpointer.h"
16#include "managedjobpointer.h"
17#include "qobjectdecorator.h"
24QSharedPointer<Lambda<T>> make_job(T t)
26 QSharedPointer<Lambda<T>> ret(
new Lambda<T>(t));
32inline QSharedPointer<T> make_job(T *job)
34 JobInterface *
test =
static_cast<JobInterface *
>(job);
36 return QSharedPointer<T>(job);
40inline JobPointer make_job_raw(JobInterface *job)
42 return ManagedJobPointer<JobInterface>(job);
47JobPointer enqueue(
Queue *weaver, T t)
49 JobPointer ret = make_job(t);
55QSharedPointer<T> enqueue(
Queue *weaver, T *t)
57 JobInterface *
test =
static_cast<JobInterface *
>(t);
59 QSharedPointer<T> ret(make_job(t));
66inline JobPointer enqueue<JobPointer>(
Queue *weaver, JobPointer job)
74JobPointer enqueue(T t)
80inline JobPointer enqueue_raw(
Queue *weaver, JobInterface *job)
82 return enqueue(weaver, make_job_raw(job));
86inline JobPointer enqueue_raw(JobInterface *job)
Lambda is a template that takes any type on which operator() is available, and executes it in run().
Queue implements a ThreadWeaver job queue.
static ThreadWeaver::Queue * instance()
Access the application-global Queue.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:57:09 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.