Skip to content

Commit f5665b6

Browse files
davidsulcjosevalim
authored andcommitted
Document single consumer's demand never exceeded (#217)
Adapted from https://elixir-lang.org/blog/2016/07/14/announcing-genstage/
1 parent 09bd916 commit f5665b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/gen_stage/dispatchers/broadcast_dispatcher.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ defmodule GenStage.BroadcastDispatcher do
22
@moduledoc """
33
A dispatcher that accumulates demand from all consumers
44
before broadcasting events to all of them.
5+
6+
This dispatcher guarantees that events are dispatched to all
7+
consumers without exceeding the demand of any given consumer.
58
69
If a producer uses `GenStage.BroadcastDispatcher`, its subscribers
710
can specify an optional `:selector` function that receives the event

0 commit comments

Comments
 (0)