RecoverableStreamEx v1.0.0 RecoverableStream.TasksPool View Source
A default Supervisor
for tasks spawned by RecoverableStream
.
Link to this section Summary
Functions
A template child_spec
for a custom Task.Supervisor
.
Link to this section Functions
A template child_spec
for a custom Task.Supervisor
.
Example
iex> {:ok, _} = Supervisor.start_child(
...> RecoverableStreamEx.Supervisor,
...> RecoverableStream.TasksPool.child_spec(:my_sup))
...> RecoverableStream.run(
...> fn x -> Stream.repeatedly(fn -> x end) end,
...> task_supervisor: :my_sup
...> ) |> Stream.take(2) |> Enum.into([])
[nil, nil]