![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
Public Member Functions | |
| ThreadPool (size_t threads, std::function< void()> onThreadStart=[]() {}, std::function< void()> onThreadStop=[]() {}) | |
| template<class F, class... Args> | |
| auto | enqueue (F &&f, Args &&... args) -> std::future< std::invoke_result_t< F, Args... > > |
| void | enqueueRaw (std::function< void()> f) |
| size_t | trySetSize (size_t size) |
| size_t | getSize () const |
| size_t | getQueueSize () |
| auto inviwo::ThreadPool::enqueue | ( | F && | f, |
| Args &&... | args )->std::future< std::invoke_result_t< F, Args... > > |
Enqueue function f with arguments args. The function f may throw exceptions.
| void inviwo::ThreadPool::enqueueRaw | ( | std::function< void()> | f | ) |
Enqueue a plain functor. The functor may not throw exceptions.