salvus.flow.acta.session.future
salvus.flow.acta.session.future salvus flow acta session future Deferred task execution with synchronous and asynchronous result access.
Functions
gather()
gather()def gather(futures: Future) -> list[SessionResult]: ...Run futures concurrently and return their results synchronously.
Raise the first failure after siblings finish. Each future retains its
own result or error. Async callers can use asyncio.gather directly.
Parameters
futuresFuture — The futures to demand. Their order is the order of the results.
Returns list[SessionResult] — One result per future, in the order given.
Classes
Future
Futureclass Future(builtins.object):
def __init__(
self, session: Session, task_name: str, params: dict[str, Any]
) -> None: ...A deferred task call bound to its submitting session.
Parameters
sessionSession — Session used when the result is requested, even outside its context block.task_namestr — Registered task name.paramsdict[str, Any] — Arguments accepted bySession.run.
Attributes
done bool
done boolReturn whether the future has completed, successfully or with an error.
key str | None
key str | NoneReturn the envelope key, or None before it is known.
task_name str
task_name strReturn the registered task name.
Methods
result()
result()def result(self) -> SessionResult: ...Run the task if needed and return its result synchronously.
Reuse completed results and re-raise recorded failures.
Returns SessionResult — What
Session.run returned for this call.