andreaslochbihler-da commented on code in PR #1841:
URL: https://github.com/apache/pekko/pull/1841#discussion_r2116371619
##########
stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:
##########
@@ -475,13 +475,18 @@ object BroadcastHub {
/**
* INTERNAL API
+ *
+ * @param registrationPendingCallback Called during the `RegistrationPending`
event of a consumer with the consumer's internal ID.
+ * This is useful for controlling the
interleaving in tests.
*/
-private[pekko] class BroadcastHub[T](startAfterNrOfConsumers: Int, bufferSize:
Int)
+private[pekko] class BroadcastHub[T](startAfterNrOfConsumers: Int, bufferSize:
Int,
+ registrationPendingCallback: Long => Unit)
extends GraphStageWithMaterializedValue[SinkShape[T], Source[T, NotUsed]] {
require(startAfterNrOfConsumers >= 0, "startAfterNrOfConsumers must >= 0")
require(bufferSize > 0, "Buffer size must be positive")
require(bufferSize < 4096, "Buffer size larger then 4095 is not allowed")
require((bufferSize & bufferSize - 1) == 0, "Buffer size must be a power of
two")
+ def this(startAfterNrOfConsumers: Int, bufferSize: Int) =
this(startAfterNrOfConsumers, bufferSize, _ => ())
Review Comment:
Done.
--
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]