API Documentation
Public Member Functions | List of all members
nkTasks::Task Class Referenceabstract

A task, job that can be submitted to a nkTasks::Thread. More...

Inheritance diagram for nkTasks::Task:
nkTasks::LambdaTask nkTasks::SchedulerTask nkTasks::LambdaSchedulerTask

Public Member Functions

 Task () noexcept
 
virtual ~Task ()
 
virtual void onAsyncWork ()=0
 

Detailed Description

A task, job that can be submitted to a nkTasks::Thread.

Any external code can implement this class, enabling it to be processed by this component.

Constructor & Destructor Documentation

◆ Task()

nkTasks::Task::Task ( )
noexcept

Constructor.

◆ ~Task()

virtual nkTasks::Task::~Task ( )
virtual

Destructor.

Member Function Documentation

◆ onAsyncWork()

virtual void nkTasks::Task::onAsyncWork ( )
pure virtual

Callback for the work that the task needs to do. This will be called in the thread the task has been assigned to.

Implemented in nkTasks::LambdaSchedulerTask, and nkTasks::LambdaTask.


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