mridulm commented on pull request #30131: URL: https://github.com/apache/spark/pull/30131#issuecomment-716077517
If we want to take a look at the jdk implementation in case the documentation is unclear, please note that both `scheduleAtFixedRate` and `scheduleWithFixedDelay` rely on `ScheduleFutureTask` (for the default `ScheduledThreadPoolExecutor` in jdk) - the constructor params are different which change their behavior. More concretely, take a look at at how `setNextRunTime` computes when it should run next. For (1) above, `time` will be set to `current time` + `period` -> and so delay between tasks is `gc delay` + `period`. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org