uvi-script
Musical event scripting with Lua
AsyncTask Class Reference

An Asynchronous task. More...

Inheritance diagram for AsyncTask:
AsyncBrowseForFileTask AsyncDataLoadTask AsyncDataSaveTask AsyncListFilesTask AsyncMidiFileLoadTask

Public Member Functions

void cancel ()
 notify the task that it should be cancelled.
 

Public Attributes

int id
 unique identifier for this task
 
bool finished
 a flag to indicate whether the task has been completed. Also true after the task was cancelled: check success or state.
 
float progress
 a value between 0 and 1 to be notified of the task's progress.
 
bool success
 a flag to indicate whether the task has been successful.
 
string state
 a string to indicate the current task state (pending | running | finished | cancelled)
 

Detailed Description

An Asynchronous task.

a task object that performs an operation asynchronously

Member Function Documentation

◆ cancel()

void AsyncTask::cancel ( )

notify the task that it should be cancelled.

N.B.: Cancelling is also asynchronous, the task will not be cancelled immediately. If the task is cancelled in the middle of an operation (i.e. purging 1000 keygroups), the Engine is left in an indeterminate state and this is the script's responsibility to restore a valid state.