File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
core/src/main/scala/ox/flow Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -677,8 +677,6 @@ class FlowOps[+T]:
677677 */
678678 def groupedWithin (n : Int , duration : FiniteDuration )(using BufferCapacity ): Flow [Seq [T ]] = groupedWeightedWithin(n, duration)(_ => 1 )
679679
680- private case class GroupingTimeout (generation : Long )
681-
682680 /** Chunks up the emitted elements into groups, within a time window, or limited by the cumulative weight being greater or equal to the
683681 * `minWeight`, whatever happens first. The timeout is reset after a group is emitted. If timeout expires and the buffer is empty,
684682 * nothing is emitted. As soon as a new element is received, the flow will emit it as a single-element group and reset the timer.
@@ -691,6 +689,8 @@ class FlowOps[+T]:
691689 * The function that calculates the weight of an element.
692690 */
693691 def groupedWeightedWithin (minWeight : Long , duration : FiniteDuration )(costFn : T => Long )(using BufferCapacity ): Flow [Seq [T ]] =
692+ case class GroupingTimeout (generation : Long )
693+
694694 require(minWeight > 0 , " minWeight must be > 0" )
695695 require(duration > 0 .seconds, " duration must be > 0" )
696696
You can’t perform that action at this time.
0 commit comments