jolshan commented on code in PR #14629:
URL: https://github.com/apache/kafka/pull/14629#discussion_r1382176455
##########
core/src/main/scala/kafka/server/KafkaRequestHandler.scala:
##########
@@ -50,28 +50,36 @@ object KafkaRequestHandler {
}
/**
- * Wrap callback to schedule it on a request thread.
- * NOTE: this function must be called on a request thread.
- * @param fun Callback function to execute
- * @return Wrapped callback that would execute `fun` on a request thread
+ * A callback method that expected to be executed once in an arbitrary
request handler thread after an asynchronous action completes.
+ * The RequestLocal passed in must belong to the request handler thread that
is executing the callback.
*/
- def wrap[T](fun: T => Unit): T => Unit = {
+ class AsynchronousCompletionCallback[T](val fun: (RequestLocal, T) => Unit)
Review Comment:
I've updated the PR to reflect this.
--
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]