|
HDK
|
#include <dispatcher.h>
Inheritance diagram for Work_Dispatcher< Impl >:Public Member Functions | |
| WORK_API | ~Work_Dispatcher () noexcept |
| Wait() for any pending tasks to complete, then destroy the dispatcher. More... | |
| Work_Dispatcher (Work_Dispatcher const &)=delete | |
| Work_Dispatcher & | operator= (Work_Dispatcher const &)=delete |
| template<class Callable > | |
| void | Run (Callable &&c) |
| template<class Callable , class A0 , class... Args> | |
| void | Run (Callable &&c, A0 &&a0, Args &&...args) |
| WORK_API void | Wait () |
| Block until the work started by Run() completes. More... | |
| WORK_API void | Cancel () |
| WORK_API bool | IsCancelled () const |
Protected Member Functions | |
| WORK_API | Work_Dispatcher () |
Definition at line 32 of file dispatcher.h.
|
protected |
|
noexcept |
Wait() for any pending tasks to complete, then destroy the dispatcher.
|
delete |
| WORK_API void Work_Dispatcher< Impl >::Cancel | ( | ) |
Cancel remaining work and return immediately.
Calling this function affects task that are being run directly by this dispatcher. If any of these tasks are using their own dispatchers to run tasks, these dispatchers will not be affected and these tasks will run to completion, unless they are also explicitly cancelled.
This call does not block. Call Wait() after Cancel() to wait for pending tasks to complete.
| WORK_API bool Work_Dispatcher< Impl >::IsCancelled | ( | ) | const |
|
delete |
|
inline |
Definition at line 63 of file dispatcher.h.
|
inline |
Definition at line 78 of file dispatcher.h.
| WORK_API void Work_Dispatcher< Impl >::Wait | ( | ) |
Block until the work started by Run() completes.