You.i Engine
CYITask<> Class Template Referenceabstract

Detailed Description

class CYITask<>

Void specialization of CYITask. This task does not return a value when executed.

See also

#include <thread/YiTask.h>

Inheritance diagram for CYITask<>:

Public Member Functions

 CYITask ()
 CYITask (CYIFuture<> future)
bool SetFuture (CYIFuture<> future)
- Public Member Functions inherited from CYITaskBase
virtual ~CYITaskBase ()
State GetState () const
bool MarkPendingExecution ()
void RequestCancellation ()
bool IsCancellationRequested () const
void SetCancellationRequestSucceeded ()
bool IsCancellationRequestSucceeded () const
bool Execute ()

Protected Member Functions

virtual void Run ()=0

Additional Inherited Members

- Public Types inherited from CYITaskBase
enum  State : uint8_t {

Constructor & Destructor Documentation

◆ CYITask() [1/2]

CYITask<>::CYITask ( )

◆ CYITask() [2/2]

CYITask<>::CYITask ( CYIFuture<>  future)

Member Function Documentation

◆ Run()

virtual void CYITask<>::Run ( )
protectedpure virtual

The function executed by this task. Implement this function in a sub-classe to implement your own task.

◆ SetFuture()

bool CYITask<>::SetFuture ( CYIFuture<>  future)

Creates an association between the provided CYIFuture object and this CYITask. If a CYIFuture object is already associated with this CYITask, this function does nothing and false is returned. If the provided CYIFuture object already has an associated task, this function does nothing and false is returned.

Associatations with CYIFuture objects can only be done prior to execution of the task and prior to enqueing the task in a task executor.
This function is not threadsafe.
Returns true if the provided CYIFuture object was successfully associated with this Task.

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