limitWeighted

Ensure stream boundedness by evaluating the cost of incoming elements using a cost function.

Simple operators

Signature

def limitWeighted[T](max: Long)(costFn: Out ⇒ Long): Repr[Out]

Description

Ensure stream boundedness by evaluating the cost of incoming elements using a cost function. Evaluated cost of each element defines how many elements will be allowed to travel downstream.

emits when upstream emits and the number of emitted elements has not reached max

backpressures when downstream backpressures

completes when upstream completes and the number of emitted elements has not reached max

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.