https://github.com/pcmarks/genstage_example_2
GenStage example with a multi-input stage.
https://github.com/pcmarks/genstage_example_2
Last synced: 13 days ago
JSON representation
GenStage example with a multi-input stage.
- Host: GitHub
- URL: https://github.com/pcmarks/genstage_example_2
- Owner: pcmarks
- Created: 2016-08-08T15:03:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-21T19:32:46.000Z (over 8 years ago)
- Last Synced: 2025-02-17T10:48:52.085Z (3 months ago)
- Language: Elixir
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GenstageExample2
This is an example of a simple four stage GenStage flow. It features a multi-input stage - an adder that requires two values and computes their sum. For a more detailed
explanation, please see this blog [post](www.elixirfbp.com)The example is meant to illustrate how to:
1. design a multi-input stage, and
2. allow for the uneven appearances of input events.Two examples of flows are possible - see the comments for directions:
1. Two Constant stages feed a Sum stage whose output is asked for by a
Timer stage.
2. Two enumerated flows feed a Sum stage whose output is asked for by a
Timer stage.## To run:
1. cd genstage_example_2
2. mix deps.get
3. mix run lib/genstage_example_2.exs