12#include <QSharedPointer>
14#include "jobpointer.h"
15#include "threadweaver_export.h"
29class THREADWEAVER_EXPORT JobInterface
40 Status_NumberOfStatuses,
43 virtual ~JobInterface()
46 virtual void execute(
const JobPointer &job, Thread *) = 0;
47 virtual void blockingExecute() = 0;
48 virtual Executor *setExecutor(Executor *executor) = 0;
49 virtual Executor *executor()
const = 0;
50 virtual int priority()
const = 0;
52 virtual void setStatus(Status) = 0;
53 virtual bool success()
const = 0;
54 virtual void requestAbort() = 0;
55 virtual void aboutToBeQueued(QueueAPI *api) = 0;
56 virtual void aboutToBeQueued_locked(QueueAPI *api) = 0;
57 virtual void aboutToBeDequeued(QueueAPI *api) = 0;
58 virtual void aboutToBeDequeued_locked(QueueAPI *api) = 0;
59 virtual bool isFinished()
const = 0;
60 virtual void assignQueuePolicy(QueuePolicy *) = 0;
61 virtual void removeQueuePolicy(QueuePolicy *) = 0;
63 virtual void run(JobPointer self, Thread *thread) = 0;
64 friend class Executor;
65 virtual void defaultBegin(
const JobPointer &job, Thread *thread) = 0;
66 virtual void defaultEnd(
const JobPointer &job, Thread *thread) = 0;
67 virtual QMutex *mutex()
const = 0;
Q_SCRIPTABLE CaptureState status()
QFuture< T > run(Function function,...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:06 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.