ThreadWeaver

queuestream.h
1/* -*- C++ -*-
2 This file is part of ThreadWeaver, a KDE framework.
3
4 SPDX-FileCopyrightText: 2013 Mirko Boehm <mirko@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef QUEUESTREAM_H
10#define QUEUESTREAM_H
11
12#include "jobinterface.h"
13#include "threadweaver_export.h"
14
15namespace ThreadWeaver
16{
17class Queue;
18class Job;
19
20/** @brief QueueStream implements a stream based API to access ThreadWeaver queues. */
22{
23public:
24 explicit QueueStream(Queue *queue);
26 void add(const JobPointer &job);
27 void flush();
28
30 QueueStream &operator<<(JobInterface *job);
31 // FIXME try with QObjectDecorator (JobInterface&)
33
34private:
35 class Private;
36 Private *const d;
37};
38
40
41}
42
43#endif // QUEUESTREAM_H
A Job is a simple abstraction of an action that is to be executed in a thread context.
Definition job.h:47
Lambda is a template that takes any type on which operator() is available, and executes it in run().
Definition lambda.h:20
QueueStream implements a stream based API to access ThreadWeaver queues.
Definition queuestream.h:22
Queue implements a ThreadWeaver job queue.
Definition queue.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.