Picos_structured.PromiseSourceA cancelable promise.
âšī¸ In addition to using a promise to concurrently compute and return a value, a cancelable promise can also represent a concurrent fiber that will continue until it is explicitly canceled.
Represents a promise to return value of type 'a.
await promise awaits until the promise has completed and either returns the value that the evaluation of the promise returned, raises the exception that the evaluation of the promise raised, or raises the Terminate exception in case the promise has been canceled.
is_running promise determines whether the completion of the promise is still pending.
try_terminate promise tries to terminate the promise by canceling it with the Terminate exception and returns true in case of success and false in case the promise had already completed, i.e. either returned, raised, or canceled.
terminate promise is equivalent to try_terminate promise |> ignore.