View Source Duct.Parallel (duct v1.0.3)
Link to this section Summary
Functions
Returns an empty Duct.Parallel
struct.
Adds a function to run parallel.
Returns the list of operations stored in multi
.
Link to this section Types
Link to this section Functions
@spec new() :: t()
Returns an empty Duct.Parallel
struct.
example
Example
iex> Duct.Parallel.new() |> Duct.Parallel.to_list()
[]
Adds a function to run parallel.
example
Example
Duct.Parallel.new()
|> Duct.Parallel.run("facebook", fn -> post(:facebook) end)
|> Duct.Parallel.run("twitter", fn -> post(:twitter) end)
|> Duct.run()
Returns the list of operations stored in multi
.
Always use this function when you need to access the operations you
have defined in Duct.Multi
. Inspecting the Duct.Multi
struct internals
directly is discouraged.