Word Game Builder 2.0.1f2
Reference Manual
Public Member Functions | Static Public Member Functions | Properties | List of all members
AsyncTask Class Reference

Represents an asynchronous task. More...

+ Inheritance diagram for AsyncTask:
+ Collaboration diagram for AsyncTask:

Public Member Functions

void Abort ()
 Abort this task. More...
 
void AbortWait ()
 Abort this task, and wait until it has ended. More...
 
void AbortWaitForSeconds (float seconds)
 Abort this task, and wait until it has ended, or the specified amount of time (in seconds) has passed. More...
 
void Dispose ()
 Disposes this task and waits for completion if it is still running. More...
 
void Wait ()
 Blocks the calling thread until the task has ended. More...
 
void WaitForSeconds (float seconds)
 Blocks the calling thread until the task has ended, or the specified amount of time (in seconds) has passed. More...
 

Static Public Member Functions

static AsyncTask Create (Action< AsyncTask > action)
 Creates a task on a background thread. More...
 
static void Create (Action action)
 Creates a task on a background thread, without tracking task state. More...
 
static AsyncTask Dispatch (Action< AsyncTask > action)
 Dispatches an action onto the main thread. More...
 
static void Dispatch (Action action)
 Dispatches an action onto the main thread, without tracking task state. More...
 

Properties

bool hasEnded [get]
 Returns true if this task has ended, been skipped, or been aborted. More...
 
bool isFailed [get]
 Returns true if this task has failed. More...
 
bool isSucceeded [get]
 Returns true if this task was successful. More...
 

Detailed Description

Represents an asynchronous task.

Member Function Documentation

void Abort ( )
inline

Abort this task.

+ Here is the caller graph for this function:

void AbortWait ( )
inline

Abort this task, and wait until it has ended.

void AbortWaitForSeconds ( float  seconds)
inline

Abort this task, and wait until it has ended, or the specified amount of time (in seconds) has passed.

Parameters
secondsThe maximum amount of seconds to wait.

+ Here is the caller graph for this function:

static AsyncTask Create ( Action< AsyncTask action)
inlinestatic

Creates a task on a background thread.

Parameters
actionThe action to run on a background thread.
Returns
An object representing the asynchronous task.

+ Here is the caller graph for this function:

static void Create ( Action  action)
inlinestatic

Creates a task on a background thread, without tracking task state.

Parameters
actionThe action to run on a background thread.
static AsyncTask Dispatch ( Action< AsyncTask action)
inlinestatic

Dispatches an action onto the main thread.

Parameters
actionThe action to run on the main thread.
Returns
An object representing the asynchronous task.

+ Here is the caller graph for this function:

static void Dispatch ( Action  action)
inlinestatic

Dispatches an action onto the main thread, without tracking task state.

Parameters
actionThe action to run on the main thread.
void Dispose ( )
inline

Disposes this task and waits for completion if it is still running.

void Wait ( )
inline

Blocks the calling thread until the task has ended.

void WaitForSeconds ( float  seconds)
inline

Blocks the calling thread until the task has ended, or the specified amount of time (in seconds) has passed.

Parameters
secondsThe maximum amount of seconds to wait.

Property Documentation

bool hasEnded
get

Returns true if this task has ended, been skipped, or been aborted.

bool isFailed
get

Returns true if this task has failed.

bool isSucceeded
get

Returns true if this task was successful.