ThreadSchedule 4.1.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::scheduled_task Class Reference

#include <scheduled_task.hpp>

Public Member Functions

 scheduled_task (scheduled_task const &)=default
 scheduled_task (scheduled_task &&) noexcept=default
auto operator= (scheduled_task const &) -> scheduled_task &=default
auto operator= (scheduled_task &&) noexcept -> scheduled_task &=default
void cancel ()
 Request cancellation of the scheduled task.
auto is_cancelled () const noexcept -> bool
 Return whether cancellation has been requested/observed.
auto id () const noexcept -> std::uint64_t
 Return the backend-assigned task identifier.

Friends

class scheduled_pool
struct detail::scheduled_task_access

Detailed Description

Definition at line 20 of file scheduled_task.hpp.

Constructor & Destructor Documentation

◆ scheduled_task() [1/2]

threadschedule::scheduled_task::scheduled_task ( scheduled_task const & )
default

◆ scheduled_task() [2/2]

threadschedule::scheduled_task::scheduled_task ( scheduled_task && )
defaultnoexcept

References scheduled_task().

Member Function Documentation

◆ cancel()

void threadschedule::scheduled_task::cancel ( )
inline

Request cancellation of the scheduled task.

Cancellation is best-effort and may be ignored if the task is already running or has completed.

Definition at line 35 of file scheduled_task.hpp.

References cancel().

Referenced by cancel().

◆ id()

auto threadschedule::scheduled_task::id ( ) const->std::uint64_t
inlinenodiscardnoexcept

Return the backend-assigned task identifier.

Definition at line 53 of file scheduled_task.hpp.

◆ is_cancelled()

auto threadschedule::scheduled_task::is_cancelled ( ) const->bool
inlinenodiscardnoexcept

Return whether cancellation has been requested/observed.

Definition at line 44 of file scheduled_task.hpp.

◆ operator=() [1/2]

auto threadschedule::scheduled_task::operator= ( scheduled_task && ) ->scheduled_task &=default
defaultnoexcept

References scheduled_task().

◆ operator=() [2/2]

auto threadschedule::scheduled_task::operator= ( scheduled_task const & ) ->scheduled_task &=default
default

References scheduled_task().

◆ detail::scheduled_task_access

friend struct detail::scheduled_task_access
friend

Definition at line 63 of file scheduled_task.hpp.

◆ scheduled_pool

friend class scheduled_pool
friend

Definition at line 62 of file scheduled_task.hpp.

References scheduled_pool.

Referenced by scheduled_pool.


The documentation for this class was generated from the following file: