프로퍼티 | 타입 | 설명 | |
---|---|---|---|
_dispatcher | IDispatcher | ||
_endCallbacks | List |
||
_exception | |||
_failureCallbacks | List |
||
_finished | bool | ||
_progressCallbacks | List |
||
_result | object | ||
_succeeded | bool | ||
_successCallbacks | List |
||
_thread | Thread | ||
_waitHandle |
메소드 | 설명 | |
---|---|---|
All ( ) : |
Combines multiple tasks of the same type into one callback and runs them simultaneously. On failure the failure callback is called immediately and the result of the other tasks is discarded.
|
|
AllSequential ( ) : |
Combines multiple tasks of the same type into one callback and runs them sequentially. On failure the failure callback is called immediately and the result of the other tasks is discarded.
|
|
Notify ( float progress ) : void |
Fire all the progress callbacks with the current progress
|
|
Reject ( |
Finish the task with an error state
|
|
Resolve ( object value = null ) : |
Finish the task with a result
|
|
Then ( Action |
Add callbacks that will fire on certain task states. If the task has already completed or failed, the related callbacks will fire immediately. Returns the this task so that calls can be chained together.
|
|
UnityTask ( IDispatcher dispatcher = null ) : System |
Initializes a new instance of the UnityTask`1 class.
|
|
UnityTask ( UnityTaskAutoThreadDelegate taskAction, IDispatcher dispatcher = null ) : System |
Initializes a new instance of the UnityTask`1 class which wraps an action, automatically running it on a new thread. All uncaught exceptions thrown in the spawned thread will automatically trigger Task.Reject().
|
메소드 | 설명 | |
---|---|---|
All ( IDispatcher dispatcher ) : |
Combines multiple tasks of the same type into one callback and runs them simultaneously. On failure the failure callback is called immediately and the result of the other tasks is discarded.
|
|
AllSequential ( IDispatcher dispatcher ) : |
Combines multiple tasks of the same type into one callback and runs them sequentially. On failure the failure callback is called immediately and the result of the other tasks is discarded.
|
|
FireEndCallbacks ( ) : void |
Called internally to trigger all the onEnd callbacks
|
public Notify ( float progress ) : void | ||
progress | float | A floating point value representing the current progress |
리턴 | void |
public Reject ( |
||
error | Error details. | |
리턴 |
public Resolve ( object value = null ) : |
||
value | object | The result of the task. |
리턴 |
public Then ( Action | ||
onFulfilled | Action | Callback that fires when the task succeeds |
onFailure | Action |
Callback that fires when the task fails |
onProgress | Action |
Callback that fires when the progress of the task changes |
onEnd | System.Action | Callback that fires when the task succeeds or fails |
리턴 |
public UnityTask ( IDispatcher dispatcher = null ) : System | ||
dispatcher | IDispatcher | |
리턴 | System |
public UnityTask ( UnityTaskAutoThreadDelegate taskAction, IDispatcher dispatcher = null ) : System | ||
taskAction | UnityTaskAutoThreadDelegate | The delegate that will be executed on a seperate thread. |
dispatcher | IDispatcher | |
리턴 | System |