gen_stage
gen_stage copied to clipboard
Producer and consumer actors with back-pressure for Elixir
* {:continue, _term} instructions can now be returned as one would expect from gen_server. * :hibernate is now supported on init similar to gen_server. Attempts to revive #227
Attempt to provide more even distribution to consumers than demand dispatcher. It should allow different max demands but prevent greedy consumers - unless other consumers are exhausted. Also allows splitting...
I took the liberty to address the feedback for this PR https://github.com/elixir-lang/gen_stage/pull/264 as it was open for more than a year. @hazardfn hope you are okay with this? GenServers also...
### Problem Addresses #315 The `GenStage.Buffer` module was returning permanent events in LIFO instead of FIFO order when multiple permanent events were stored at the same wheel position. ### Reproduction...
**Problem** 1. Populate a producer's buffer 2. Queue multiple `sync_info`/`async_info` messages 3. Drain the buffer 4. sync_info messages are delivered - but they are delivered LIFO instead of FIFO **Example**...