KisThreadPool Class Reference
#include <kis_thread_pool.h>
Inheritance diagram for KisThreadPool:
Public Member Functions | |
| void | enqueue (KisThread *thread) |
| void | dequeue (KisThread *thread) |
| void | run () |
Public Member Functions inherited from KisThread | |
| KisThread () | |
| virtual void | cancel () |
| virtual bool | isCanceled () |
| void | runDirectly () |
Static Public Member Functions | |
| static KisThreadPool * | instance () |
Additional Inherited Members | |
Protected Attributes inherited from KisThread | |
| bool | m_canceled |
Detailed Description
A thread pool starts executing threads some time after they are added, running a maximum number of threads at one time.
The pool takes ownership of the threads and deletes them once they have run. This means that you cannot add getters for important data to threads you feed the threadpool. Instead, post the data using a customevent.
Definition at line 36 of file kis_thread_pool.h.
Constructor & Destructor Documentation
◆ ~KisThreadPool()
|
virtual |
Definition at line 43 of file kis_thread_pool.cpp.
◆ KisThreadPool()
| KisThreadPool::KisThreadPool | ( | ) |
Definition at line 26 of file kis_thread_pool.cpp.
Member Function Documentation
◆ dequeue()
| void KisThreadPool::dequeue | ( | KisThread * | thread | ) |
Definition at line 112 of file kis_thread_pool.cpp.
◆ enqueue()
| void KisThreadPool::enqueue | ( | KisThread * | thread | ) |
Definition at line 102 of file kis_thread_pool.cpp.
◆ instance()
|
static |
Definition at line 84 of file kis_thread_pool.cpp.
◆ run()
| void KisThreadPool::run | ( | ) |
Definition at line 146 of file kis_thread_pool.cpp.
The documentation for this class was generated from the following files:

Public Member Functions inherited from