Kaffe.PartitionSelector (Kaffe v1.26.0) View Source

Link to this section Summary

Link to this section Functions

Link to this function

round_robin(current, total)

View Source

Cycle current from 0 to total-1.

Examples

iex> Kaffe.PartitionSelector.round_robin(nil, 3) 0

iex> Kaffe.PartitionSelector.round_robin(0, 3) 1

iex> Kaffe.PartitionSelector.round_robin(1, 3) 2

iex> Kaffe.PartitionSelector.round_robin(2, 3) 0