jolshan commented on code in PR #14629:
URL: https://github.com/apache/kafka/pull/14629#discussion_r1378225151


##########
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:
   Jun wanted the explicit class so folks would see the comment about the 
request local etc.
   We could do a case class otherwise



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to