interface Future
thefrontside/effectionA value that is both an Operation and Promise.
Futures are operations that are implicitly associated with an Effection scope
and so they can be freely awaited within any async functions. However, they
can also be evaluated directly within another operation, so among other
things, if the operation resolves synchronously, it will continue within the
same tick of the run loop.
Examples
Example 1
let task = run(function* () {
return 42;
});
// in an effection scope
let valueFromYield = yield* task;
// in an async function
let valueFromAwait = await task;
Type Parameters
T