tedyu commented on code in PR #50020:
URL: https://github.com/apache/spark/pull/50020#discussion_r1993452621
##########
core/src/main/scala/org/apache/spark/BarrierCoordinator.scala:
##########
@@ -134,11 +138,8 @@ private[spark] class BarrierCoordinator(
// Cancel the current active TimerTask and release resources.
private def cancelTimerTask(): Unit = {
- if (timerTask != null) {
- timerTask.cancel()
- timer.purge()
- timerTask = null
- }
+ timerFutures.asScala.foreach(_.cancel(false))
Review Comment:
Thanks for your comment.
I think merging the removal of futures with cancellation would make the code
amenable to future code changes.
--
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]