API ReferenceSandbox
TaskSourceclass
Provides a way for us to cancel tasks after common async shit is executed.
object→TaskSource
Methods33
Showing 33 methods
public static Sandbox.TaskSource Create(System.Threading.CancellationToken token = null)
| Parameter | Type | Description |
|---|---|---|
| token = null | CancellationToken | — |
public static System.Threading.CancellationTokenSource CreateLinkedTokenSource()
Create a token source, which will also be cancelled when sessions end
Returns:
CancellationTokenSource—public System.Threading.Tasks.Task FixedUpdate()
Wait until the next fixed update
Returns:
Task—public System.Threading.Tasks.Task Frame()
Wait until the start of the next frame
Returns:
Task—public System.Threading.Tasks.Task FrameEnd()
Wait until the end of the frame
Returns:
Task—public System.Threading.Tasks.Task FromCanceled(System.Threading.CancellationToken token)
| Parameter | Type | Description |
|---|---|---|
| token | CancellationToken | — |
Returns:
Task—public System.Threading.Tasks.Task FromException(System.Exception e)
| Parameter | Type | Description |
|---|---|---|
| e | Exception | — |
Returns:
Task—public System.Threading.Tasks.Task`1<T> FromResult(T t)
| Parameter | Type | Description |
|---|---|---|
| t | T | — |
Returns:
Task<T>—public Sandbox.Tasks.SyncTask MainThread()
Continues on the main thread.
public void WaitAll(System.Threading.Tasks.Task[] tasks)
| Parameter | Type | Description |
|---|---|---|
| tasks | Task[] | — |
Returns:
void—public void WaitAny(System.Threading.Tasks.Task[] tasks)
| Parameter | Type | Description |
|---|---|---|
| tasks | Task[] | — |
Returns:
void—public System.Threading.Tasks.Task Yield()
Returns:
Task—No results match this filter.
Properties2
Showing 2 properties
public System.Threading.Tasks.Task Sandbox.TaskSource.CompletedTask { get; set; }
Returns:
Task—public bool Sandbox.TaskSource.IsValid { get; set; }
Returns:
bool—No results match this filter.