Reactor.Executor.Async (reactor v0.12.1)
View SourceHandle the asynchronous execution of a batch of steps, along with any mutations to the reactor or execution state.
Summary
Functions
When the Reactor needs to shut down for any reason, we need to await all the currently running asynchronous steps and delete any task vertices.
Handle zero or one completed async steps and then decide what to do.
Start as many of the provided steps as possible.
Functions
@spec collect_remaining_tasks_for_shutdown(Reactor.t(), Reactor.Executor.State.t()) :: {Reactor.t(), Reactor.Executor.State.t()}
When the Reactor needs to shut down for any reason, we need to await all the currently running asynchronous steps and delete any task vertices.
@spec handle_completed_steps(Reactor.t(), Reactor.Executor.State.t()) :: {:recurse | :continue | :undo | :halt, Reactor.t(), Reactor.Executor.State.t()}
Handle zero or one completed async steps and then decide what to do.
@spec start_steps( Reactor.t(), Reactor.Executor.State.t(), [Reactor.Step.t()], Supervisor.supervisor() ) :: {:continue | :recurse, Reactor.t(), Reactor.Executor.State.t()} | {:error, any()}
Start as many of the provided steps as possible.
Takes into account he maximum concurrency and available work slots.