|
ThreadSchedule 3.0.0
Modern C++ thread management library
|
Copyable handle for a cancellable scheduled task. More...
#include <scheduled_task_backend.hpp>
Public Member Functions | |
| scheduled_task_backend (uint64_t id) | |
| scheduled_task_backend (scheduled_task_backend const &)=default | |
| auto | operator= (scheduled_task_backend const &) -> scheduled_task_backend &=default |
| scheduled_task_backend (scheduled_task_backend &&other) noexcept | |
| auto | operator= (scheduled_task_backend &&other) noexcept -> scheduled_task_backend & |
| void | cancel () |
| auto | is_cancelled () const noexcept -> bool |
| auto | id () const noexcept -> uint64_t |
Friends | |
| template<typename > | |
| class | scheduled_pool_backend_base |
Copyable handle for a cancellable scheduled task.
Copyable (its cancellation state is shared). Both cancel() and is_cancelled() are thread-safe.
Cancellation is cooperative: the scheduler checks the flag before dispatching the task to the worker pool, but a task that is already executing will not be interrupted.
Definition at line 25 of file scheduled_task_backend.hpp.
|
inlineexplicit |
Definition at line 28 of file scheduled_task_backend.hpp.
|
default |
|
inlinenoexcept |
Definition at line 36 of file scheduled_task_backend.hpp.
References threadschedule::detail::other.
|
inline |
Definition at line 55 of file scheduled_task_backend.hpp.
Referenced by threadschedule::scheduled_task::cancel(), and threadschedule::detail::scheduled_pool_backend_base< PoolType >::cancel().
|
inlinenoexcept |
Definition at line 69 of file scheduled_task_backend.hpp.
Referenced by threadschedule::scheduled_task::id().
|
inlinenoexcept |
Definition at line 62 of file scheduled_task_backend.hpp.
Referenced by threadschedule::scheduled_task::is_cancelled().
|
inlinenoexcept |
Definition at line 43 of file scheduled_task_backend.hpp.
References threadschedule::detail::other.
|
default |
|
friend |
Definition at line 79 of file scheduled_task_backend.hpp.