Click or drag to resize
Akka.NETSubFlowOperationsLimitWeightedT, TMat, TClosed Method
Ensure stream boundedness by evaluating the cost of incoming elements using a cost function. Exactly how many elements will be allowed to travel downstream depends on the evaluated cost of each element. If the accumulated cost exceeds max, it will signal upstream failure StreamLimitReachedException downstream. Due to input buffering some elements may have been requested from upstream publishers that will then not be processed downstream of this step. The stream will be completed without producing any elements if max is zero or negative.

Emits when the specified number of elements to take has not yet been reached

Backpressures when downstream backpressures

Completes when the defined number of elements has been taken or upstream completes

Cancels when the defined number of elements has been taken or downstream cancels

Namespace:  Akka.Streams.Dsl
Assembly:  Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
public static SubFlow<T, TMat, TClosed> LimitWeighted<T, TMat, TClosed>(
	this SubFlow<T, TMat, TClosed> flow,
	long max,
	Func<T, long> costFunc
)

Parameters

flow
Type: Akka.Streams.DslSubFlowT, TMat, TClosed
TBD
max
Type: SystemInt64
TBD
costFunc
Type: SystemFuncT, Int64
TBD

Type Parameters

T
TBD
TMat
TBD
TClosed
TBD

Return Value

Type: SubFlowT, TMat, TClosed
TBD

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SubFlowT, TMat, TClosed. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference