AsyncTaskQueue.kl¶
Types¶
AsyncTask (object)¶
Methods¶
| AsyncTask ( in AsyncTask other ) | |
| AsyncTask () | |
| Boolean | cancelRequested ? () |
| AsyncTask | clone ? () |
| Boolean | execute ! () |
| executionDone ! ( in Boolean executeResult ) | |
| String | getDebugName ? () |
| Boolean | hasExecuted ? () |
| Boolean | hasExecutedSuccessfully ? () |
| Boolean | mainThreadFinalizeWork ! () |
| Boolean | requiresMainThreadFinalizeWork ? () |
AsyncTaskQueue (object)¶
The AsyncTaskQueue manages asynchronous tasks by allowing these to be executed by [background] worker threads, with a notion of priority. Optionally, these tasks can request a “finalize” step to be executed on the main thread (to reduce synchronization issues). Also, it allows to know if some tasks have finished executing by maintaining a completedTaskCount. It allows, too, to cancel tasks or request their cancellation if these are already executing.
Members¶
| Size | coreCount | |
| Boolean | asyncEnabled | |
| AsyncTask[] | perThreadExecutingTasks | |
| AsyncTaskCircularBuffer[10] | tasksByPrio | |
| AsyncTaskCircularBuffer | tasksToFinalizeOnMainThread | |
| UInt32 | completedTaskCount | |
| SInt32 | activeOperatorsCount | |
| SInt32 | waitingAsyncTasksCount | |
| SInt32 | executingTasksCount | |
| SInt32 | finalizingTasksCount |
Methods¶
| AsyncTaskQueue ( in AsyncTaskQueue other ) | |
| AsyncTaskQueue () | |
| addTask ! ( in Ref<AsyncTask> task ) | |
| addTask ! ( in Ref<AsyncTask> task, in UInt8 priority ) | |
| Boolean | cancelTask ! ( in Ref<AsyncTask> task ) |
| Boolean | checkTasksStatus ? ( io UInt32 lastCompletedTaskCount ) |
| AsyncTaskQueue | clone ? () |
| enableAsynchronousEvaluation ! ( in Boolean enable ) | |
| UInt32 | getExecutingTasksCount ? () |
| UInt32 | getPendingTasksCount ? () |
| Boolean | isCurrentThreadExecutingAsync ? () |
| Boolean | tryExecuteTask ! ( in Ref<AsyncTask> task ) |
| waitForAllAsyncTasks ! () | |
| Boolean | waitForNextCompletion ! () |