zwarm v0.1.0 Zwarm

Zwarm allows you to start, manage and run a collection of identical processes with ease.

Usage

# Create a swarm of three processes
ref = Zwarm.create!(3, fn -> IO.puts "Hello" end)

# Run them all
Zwarm.run(ref)

# Destroy
Zwarm.destroy(ref)

Link to this section Summary

Functions

Create a swarm of count processes

Create a swarm of count process, and supply a function and its args to be executed by each individual process when Zwarm.run is called

Create a swarm of count processes, but raise if it fails

Create swarm with additional function and args. Raise exception if it fails

Instruct a swarm to execute function on all its processes

Direct all swarm’s processes to run

Get status of a swarm

Link to this section Functions

Create a swarm of count processes

Link to this function create(count, fun, args \\ [])

Create a swarm of count process, and supply a function and its args to be executed by each individual process when Zwarm.run is called

Create a swarm of count processes, but raise if it fails

Link to this function create!(count, fun, args \\ [])

Create swarm with additional function and args. Raise exception if it fails

Link to this function destroy(swarm_ref)

Instruct a swarm to execute function on all its processes

Direct all swarm’s processes to run

Link to this function status(swarm_ref)

Get status of a swarm