File tree 3 files changed +6
-6
lines changed
stream/src/main/scala/org/apache/pekko/stream/impl
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ import pekko.stream.stage._
45
45
private val maxBuffer = inheritedAttributes.get[InputBuffer ](InputBuffer (16 , 16 )).max
46
46
require(maxBuffer > 0 , " Buffer size must be greater than 0" )
47
47
48
- private val buffer : util.Deque [In ] = new util.ArrayDeque [In ]()
48
+ private val buffer : util.ArrayDeque [In ] = new util.ArrayDeque [In ]()
49
49
private var acknowledgementReceived = false
50
50
private var completeReceived = false
51
51
private var completionSignalled = false
@@ -75,7 +75,7 @@ import pekko.stream.stage._
75
75
}
76
76
77
77
private def dequeueAndSend (): Unit = {
78
- ref ! messageAdapter(self)(buffer.poll ())
78
+ ref ! messageAdapter(self)(buffer.pollFirst ())
79
79
}
80
80
81
81
private def finish (): Unit = {
@@ -85,7 +85,7 @@ import pekko.stream.stage._
85
85
}
86
86
87
87
def onPush (): Unit = {
88
- buffer.offer (grab(in))
88
+ buffer.offerLast (grab(in))
89
89
if (acknowledgementReceived) {
90
90
dequeueAndSend()
91
91
acknowledgementReceived = false
Original file line number Diff line number Diff line change @@ -524,7 +524,7 @@ private final case class SavedIslandData(
524
524
if (Debug ) println(s " PUSH: $matValue => $matValueStack" )
525
525
526
526
case Concat (first, next) =>
527
- if (next ne EmptyTraversal ) traversalStack.add (next)
527
+ if (next ne EmptyTraversal ) traversalStack.addLast (next)
528
528
nextStep = first
529
529
case Pop =>
530
530
val popped = matValueStack.removeLast()
Original file line number Diff line number Diff line change @@ -793,7 +793,7 @@ import org.reactivestreams.Subscription
793
793
else if (currentLimit == 0 ) {
794
794
self ! Resume
795
795
} else {
796
- shortCircuitBuffer.poll () match {
796
+ shortCircuitBuffer.pollFirst () match {
797
797
case b : BoundaryEvent => processEvent(b)
798
798
case Resume => finishShellRegistration()
799
799
case unexpected =>
@@ -842,7 +842,7 @@ import org.reactivestreams.Subscription
842
842
override def postStop (): Unit = {
843
843
if (shortCircuitBuffer ne null ) {
844
844
while (! shortCircuitBuffer.isEmpty) {
845
- shortCircuitBuffer.poll () match {
845
+ shortCircuitBuffer.pollFirst () match {
846
846
case b : BoundaryEvent =>
847
847
// signal to telemetry that this event won't be processed
848
848
b.cancel()
You can’t perform that action at this time.
0 commit comments