File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,10 @@ defmodule GenStage.PartitionDispatcher do
20
20
named `:odd` and `:even`.
21
21
22
22
* `:hash` - the hashing algorithm, which receives the event and returns
23
- a tuple with two elements, containing the event and the partition.
24
- The partition must be one of the partitions specified in `:partitions`
25
- above. The default uses `&:erlang.phash2(&1, Enum.count(partitions))`
23
+ a tuple with two elements, the event to be dispatched as first argument
24
+ and the partition as second. The partition must be one of the partitions
25
+ specified in `:partitions` above. The default uses
26
+ `fn event -> {event, :erlang.phash2(event, Enum.count(partitions))} end`
26
27
on the event to select the partition.
27
28
28
29
### Examples
You can’t perform that action at this time.
0 commit comments