=str - 19082 - Moves the allow var into the Logic of DropWithin
This commit is contained in:
parent
02ee319568
commit
8b0b63625e
1 changed files with 3 additions and 2 deletions
|
|
@ -880,9 +880,10 @@ private[stream] class TakeWithin[T](timeout: FiniteDuration) extends SimpleLinea
|
|||
}
|
||||
|
||||
private[stream] class DropWithin[T](timeout: FiniteDuration) extends SimpleLinearGraphStage[T] {
|
||||
private var allow = false
|
||||
|
||||
override def createLogic(inheritedAttributes: Attributes): GraphStageLogic = new TimerGraphStageLogic(shape) {
|
||||
|
||||
private var allow = false
|
||||
|
||||
setHandler(in, new InHandler {
|
||||
override def onPush(): Unit =
|
||||
if (allow) push(out, grab(in))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue