Distribute

data class Distribute(val buffer: Int = DefaultBufferSize, val overflow: BufferOverflow = BufferOverflow.SUSPEND) : ActionShareBehavior

Fan-out (distribute) behavior means that multiple subscribers are allowed, and each action will be distributed to one subscriber. If there are multiple subscribers, only one of them will handle an instance of an action, and the order is unspecified.

Parameters

buffer

How many actions will be buffered when consumer processes them slower than they are emitted

overflow

How actions that overflow the buffer are handled.

See also

BufferOverflow

Constructors

Link copied to clipboard
constructor(buffer: Int = DefaultBufferSize, overflow: BufferOverflow = BufferOverflow.SUSPEND)

Properties

Link copied to clipboard
val buffer: Int
Link copied to clipboard
val overflow: BufferOverflow