Axmol 3.0.0-89d6d9a
Loading...
Searching...
No Matches
CancellationToken Class Reference

Read-only cancellation signal observed by background jobs. More...

#include <JobSystem.h>

Public Member Functions

bool valid () const
 Returns true if this token is linked to a CancellationSource.
bool isCancellationRequested () const
 Returns true after the linked CancellationSource has requested cancellation.

Detailed Description

Read-only cancellation signal observed by background jobs.

A CancellationToken is usually captured by one or more queued jobs. Jobs should periodically call isCancellationRequested() and return voluntarily when it becomes true.

Note
Cancellation is cooperative. The token does not interrupt a running thread or remove queued work by itself.

The documentation for this class was generated from the following file:
  • JobSystem.h