ijuma commented on a change in pull request #11351:
URL: https://github.com/apache/kafka/pull/11351#discussion_r714467779



##########
File path: core/src/main/scala/kafka/utils/KafkaScheduler.scala
##########
@@ -53,7 +53,7 @@ trait Scheduler {
    * @param unit The unit for the preceding times.
    * @return A Future object to manage the task scheduled.
    */
-  def schedule(name: String, fun: ()=>Unit, delay: Long = 0, period: Long = 
-1, unit: TimeUnit = TimeUnit.MILLISECONDS) : ScheduledFuture[_]
+  def schedule(name: String, fun: ()=>Unit, delay: Long = 0, period: Long = 
-1, unit: TimeUnit = TimeUnit.MILLISECONDS) : Option[ScheduledFuture[_]]

Review comment:
       Yeah, it seems that we are not using this functionality at the moment so 
not sure if the additional complexity helps. Also, we can't guarantee that the 
submission will not go through just before the scheduler is closed. So, it 
gives a misleading impression that we can count on this behavior.




-- 
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