ThreadWeaver::Lambda
#include <lambda.h>
Public Member Functions | |
Lambda (T t_) | |
Public Member Functions inherited from ThreadWeaver::Job | |
Job () | |
Job (Private::Job_Private *d) | |
~Job () override | |
void | aboutToBeDequeued (QueueAPI *api) override |
void | aboutToBeDequeued_locked (QueueAPI *api) override |
void | aboutToBeQueued (QueueAPI *api) override |
void | aboutToBeQueued_locked (QueueAPI *api) override |
void | assignQueuePolicy (QueuePolicy *) override |
void | blockingExecute () override |
void | execute (const JobPointer &job, Thread *) override |
Executor * | executor () const override |
bool | isFinished () const override |
QMutex * | mutex () const override |
void | onFinish (const std::function< void(const JobInterface &job)> &lambda) |
int | priority () const override |
QList< QueuePolicy * > | queuePolicies () const override |
void | removeQueuePolicy (QueuePolicy *) override |
void | requestAbort () override |
Executor * | setExecutor (Executor *executor) override |
void | setStatus (Status) override |
bool | shouldAbort () const |
Status | status () const override |
bool | success () const override |
Protected Member Functions | |
void | run (JobPointer, Thread *) override |
Protected Member Functions inherited from ThreadWeaver::Job | |
Private::Job_Private * | d () |
const Private::Job_Private * | d () const |
void | defaultBegin (const JobPointer &job, Thread *thread) override |
void | defaultEnd (const JobPointer &job, Thread *thread) override |
Detailed Description
class ThreadWeaver::Lambda< T >
Lambda is a template that takes any type on which operator() is available, and executes it in run().
Constructor & Destructor Documentation
◆ Lambda()
|
inlineexplicit |
Member Function Documentation
◆ run()
|
inlineoverrideprotectedvirtual |
The method that actually performs the job.
It is called from execute(). This method is the one to overload it with the job's task.
The Job will be executed in the specified thread. thread may be zero, indicating that the job is being executed some other way (for example, synchronously by some other job). self specifies the job as the queue sees it. Whenever publishing information about the job to the outside world, for example by emitting signals, use self, not this. self is the reference counted object handled by the queue. Using it as signal parameters will amongst other things prevent thejob from being memory managed and deleted.
Implements ThreadWeaver::Job.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:49:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.