Class WaitWhile
Some useful wait while methods to control program flow.
Inheritance
System.Object
WaitWhile
Namespace: GDX.Threading
Syntax
public static class WaitWhile
Methods
| Improve this Doc View SourceGetEnumerator(Func<Boolean>)
Wait using an System.Collections.IEnumerator while the conditional
is true.
Declaration
public static IEnumerator GetEnumerator(Func<bool> conditional)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Boolean> | conditional | A function evaluated to determine if the wait continues. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | Yields null values. |
GetTask(Func<Boolean>)
Wait asynchronously while the conditional
is true.
Declaration
public static async Task GetTask(Func<bool> conditional)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Boolean> | conditional | A function evaluated to determine if the wait continues. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |