He-Pin commented on issue #1363:
URL: https://github.com/apache/pekko/issues/1363#issuecomment-2184927703
Update:
```scala
@InternalApi private[pekko] trait Buffer[T] {
def capacity: Int
def used: Int
def isFull: Boolean
def isEmpty: Boolean
def nonEmpty: Boolean
def enqueue(elem: T): Unit
def dequeue(): T
def peek(): T
def clear(): Unit
def dropHead(): Unit
def dropTail(): Unit
}
```
as the current `Buffer`'s `clear`, `dropHead` and `dropTail` just returns
`Unit`, change it to `returns` `Seq[T]` or `T` will help , but that can
involve: 1. large amount of change across the codebase, 2. hurt performance for
`clear` case.
So seems better to just add a new dedicated implementation with
`onBackPressureDrop` as reactor-core?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]