Oi.Executor behaviour (oi v0.6.2)

Copy Markdown

Pluggable task execution strategy for stage fan-out.

Each implementation controls how tasks within a single stage are dispatched and collected. The Dispatch calls run/3 once per stage.

Built-in implementations

Summary

Types

result()

@type result() :: {:ok, map()} | {:error, term()}

task()

@type task() :: Oi.Compile.Bundle.t()

worker()

@type worker() :: (task() -> result())

Callbacks

run(tasks, worker, opts)

@callback run(tasks :: [task()], worker :: worker(), opts :: keyword()) ::
  [result()] | {:error, term()}