Module gen_stage_demand_dispatcher

Function Index

ask/3
cancel/2
dispatch/3
info/2
init/1 A dispatcher that sends batches to the highest demand.
subscribe/3

Function Details

ask/3

ask(Counter, X2, X3) -> any()

cancel/2

cancel(X1, X2) -> any()

dispatch/3

dispatch(Events, Length, X3) -> any()

info/2

info(Msg, State) -> any()

init/1

init(Opts) -> any()

A dispatcher that sends batches to the highest demand.

This is the default dispatcher used by gen_stage. In order to avoid greedy consumers, it is recommended that all consumers have exactly the same maximum demand.

Examples

To start a producer with demands shuffled on first dispatch:

{producer, State, [{dispatcher, gen_stage_demand_dispatcher}]}

subscribe/3

subscribe(Opts, X2, X3) -> any()


Generated by EDoc