App::cJob class

Public functions

auto AddRef() -> int
auto Release() -> int
auto SetMethodCallback(cJobCallback callback, void* object) -> void
Sets the method that is called to execute this job.
auto AddDependency(cJob* other) -> void
auto AddWeakDependency(cJob* other) -> void
auto Wait() -> void
Blocks the current thread until this job finishes executing.
auto Cancel(bool wait) -> void
Cancels the execution of the job.
auto Resume() -> void
auto Continuation(cJobVoidCallback callback, void* data) -> void
Sets a function that must be executed when the job finishes.
auto GetStatus() -> int
auto SetThreadAffinity(uint32_t affinity = 0x80000000) -> void

Public variables

cJobCallback mCallback
void* mpCallbackObject
ObjectPtr mReleasebleObject
char padding
uint32_t mThreadAffinity

Function documentation

void App::cJob::SetMethodCallback(cJobCallback callback, void* object)

Sets the method that is called to execute this job.

Parameters
callback
object Additional parameter that is passed to the callback method.

void App::cJob::Cancel(bool wait)

Cancels the execution of the job.

Parameters
wait

void App::cJob::Continuation(cJobVoidCallback callback, void* data)

Sets a function that must be executed when the job finishes.

Parameters
callback Function that will be executed
data Additional data that is passed to the function.