Created
September 15, 2016 13:30
-
-
Save alvises/073a5b0c7215313e6e485b01f38af412 to your computer and use it in GitHub Desktop.
supervised genstages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:ok, p} = Producer.start_link | |
children = [ | |
worker(ProducerConsumer, [:pc_1], id: 1), | |
worker(ProducerConsumer, [:pc_2], id: 2) | |
] | |
{:ok, sup} = Supervisor.start_link children, strategy: :one_for_one | |
{:ok, consumer} = Consumer.start [:pc_1, :pc_2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment