| 1 | /* -*- C++ -*- |
| 2 | This file is part of ThreadWeaver. |
| 3 | |
| 4 | SPDX-FileCopyrightText: 2005-2014 Mirko Boehm <mirko@kde.org> |
| 5 | |
| 6 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 7 | */ |
| 8 | |
| 9 | #ifndef PRIORITYDECORATOR_H |
| 10 | #define PRIORITYDECORATOR_H |
| 11 | |
| 12 | #include <ThreadWeaver/ThreadWeaver> |
| 13 | |
| 14 | /*! |
| 15 | * \class PriorityDecorator |
| 16 | * |
| 17 | * \inmodule ThreadWeaver |
| 18 | */ |
| 19 | class PriorityDecorator : public ThreadWeaver::IdDecorator |
| 20 | { |
| 21 | public: |
| 22 | /*! |
| 23 | */ |
| 24 | explicit PriorityDecorator(int priority, ThreadWeaver::JobInterface *job, bool autoDelete = true); |
| 25 | |
| 26 | // FIXME temp |
| 27 | void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) override; |
| 28 | |
| 29 | int priority() const override; |
| 30 | |
| 31 | private: |
| 32 | int m_priority; |
| 33 | }; |
| 34 | |
| 35 | #endif // PRIORITYDECORATOR_H |
| 36 | |