Class MainThreadCoroutineCommandHandler
Basic handler of main thread commands. It queues the commands and executes any commands in the queue on update.
Inherited Members
Namespace: InsaneScatterbrain.Threading
Syntax
public class MainThreadCoroutineCommandHandler
Constructors
MainThreadCoroutineCommandHandler()
Declaration
public MainThreadCoroutineCommandHandler()
Methods
Cancel()
Stops executing any commands as soon as possible.
Declaration
public void Cancel()
Queue(MainThreadCoroutineCommand, bool)
Queues the command for executing on the next update.
Declaration
public void Queue(MainThreadCoroutineCommand command, bool waitForCompletion = true)
Parameters
| Type | Name | Description |
|---|---|---|
| MainThreadCoroutineCommand | command | The command to execute. |
| bool | waitForCompletion | Whether or not the calling thread should wait for completion of this command before continuing code execution. |
UpdateCoroutine()
Executes all queued commands on the main thread. If they're done, they are removed from the queue.
Declaration
public IEnumerator UpdateCoroutine()
Returns
| Type | Description |
|---|---|
| IEnumerator |