bowenliang123 commented on code in PR #4777:
URL: https://github.com/apache/kyuubi/pull/4777#discussion_r1178678022
##########
kyuubi-events/src/main/scala/org/apache/kyuubi/events/EventBus.scala:
##########
@@ -68,6 +70,10 @@ object EventBus extends Logging {
def registerAsync[T <: KyuubiEvent: ClassTag](et: EventHandler[T]): EventBus
=
defaultEventBus.registerAsync[T](et)
+ def deregisterAll(): Unit = {
+ defaultEventBus.deregisterAll()
Review Comment:
Which one you would suggest? Synchronized on the object of EventBus or on
the defaultEventBus instance?
```
def deregisterAll(): Unit = synchronized {
```
or
```
def deregisterAll(): Unit = defaultEventBus.synchronized {
```
--
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]