wavelength 1.0.0
Loading...
Searching...
No Matches
asynctask.h
Go to the documentation of this file.
1#pragma once
2
8typedef int (*AsyncTaskFunc)();
9
15typedef void (*AsyncTaskDoneFunc)(int nResult);
16
27
37
50
void PollAsyncTasks()
Run the completion of a finished task, and wake the worker for the next queued task.
void(* AsyncTaskDoneFunc)(int nResult)
Routine the main thread runs once the worker thread has run the task.
Definition asynctask.h:15
int(* AsyncTaskFunc)()
Routine the worker thread runs.
Definition asynctask.h:8
void InitAsyncTasks()
Start the worker thread that runs queued tasks one at a time, at priority 1.
void EnqueueAsyncTask(AsyncTaskFunc pfnTask, AsyncTaskDoneFunc pfnDone)
Queue a task for the worker thread.
void TerminateAsyncTasks()
Delete the worker thread.