28 IEnumerator<BadObject> InnerWaitForTask()
30 while (t is { IsCanceled:
false, IsCompleted:
false, IsFaulted:
false })
35 if (t.IsCompletedSuccessfully())
38 runnable!.
SetReturn(onComplete(t.Result));
59 IEnumerator<BadObject> InnerWaitForTask()
61 while (t is { IsCanceled:
false, IsCompleted:
false, IsFaulted:
false })
66 if (t.IsCompletedSuccessfully())
93 IEnumerator<BadObject> InnerWaitForTask()
95 while (t is { IsCanceled:
false, IsCompleted:
false, IsFaulted:
false })
100 if (t.IsCompletedSuccessfully())
Implements a Runnable that can return a value.
void SetReturn(BadObject obj)
Sets the Return Value.
static BadInteropRunnable WaitForTask(System.Threading.Tasks.Task t)
static BadInteropRunnable WaitForTask< T >(Task< T > t, Func< T, BadObject > onComplete)
Waits for a C# Task to complete and returns the result as a BadObject.
Gets thrown by the runtime.
The Base Class for all BadScript Objects.
static readonly BadObject Null
The Null Value for the BadScript Language.
Contains task/async Extensions and Integrations for the BadScript2 Runtime.
Contains the Error Objects for the BadScript2 Language.
Contains the Runtime Objects.
Contains Utility Functions and Classes.