beliefer commented on code in PR #44718:
URL: https://github.com/apache/spark/pull/44718#discussion_r1478139770
##########
core/src/main/scala/org/apache/spark/BarrierTaskContext.scala:
##########
@@ -283,6 +284,7 @@ object BarrierTaskContext {
@Since("2.4.0")
def get(): BarrierTaskContext =
TaskContext.get().asInstanceOf[BarrierTaskContext]
- private val timer = new Timer("Barrier task timer for barrier() calls.")
+ private val timer = ThreadUtils.newSingleThreadScheduledExecutor(
Review Comment:
The origin Timer is not a daemon thread, so I followed the same behavior.
There are some code used to cancel the timer task.
https://github.com/apache/spark/blob/db8c3058fb9d8e75f03dea6a821c50462315c513/core/src/main/scala/org/apache/spark/BarrierTaskContext.scala#L120
--
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]