Interface IDurableFuture
- Namespace
- Restate.Sdk
- Assembly
- Restate.Sdk.dll
A durable future representing the result of a non-blocking Restate operation. Used with combinators like All<T>(params ReadOnlySpan<IDurableFuture<T>>) and Race<T>(params ReadOnlySpan<IDurableFuture<T>>).
public interface IDurableFuture
Remarks
A context and the futures it hands out must not be used from more than one thread at a time: concurrent context operations reorder the journal and break replay.
Task.WhenAny and Task.WhenAll over durable futures bypass the delivery
ordering the combinators provide, so compose futures with
All<T>(params ReadOnlySpan<IDurableFuture<T>>), Race<T>(params ReadOnlySpan<IDurableFuture<T>>),
Any<T>(params ReadOnlySpan<IDurableFuture<T>>), AllSettled<T>(params ReadOnlySpan<IDurableFuture<T>>) or
WaitAll(params IDurableFuture[]).
Methods
GetResult()
Awaits the result of this future, returning it as an untyped object. Safe to await more than once: every await observes the same outcome and the same decoded value.
ValueTask<object?> GetResult()