Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/21356#discussion_r189483397
--- Diff: core/src/main/scala/org/apache/spark/util/ListenerBus.scala ---
@@ -80,6 +89,11 @@ private[spark] trait ListenerBus[L <: AnyRef, E] extends
Logging {
}
try {
doPostEvent(listener, event)
+ if (Thread.interrupted()) {
--- End diff --
> This is ok right now since Spark code never explicitly interrupts these
threads. If we ever need to do that, though, this might become a problem... but
in that case I don't know how you'd handle this issue without just giving up
and stopping everything.
If spark were to explicitly interrupt, then I think we'd also set some
other flag indicating a reason, eg. `val requestedQueueStop: AtomicBoolean` so
it shouldn't be hard to distinguish.
I've pushed an update to handle `InterruptedException` as well.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]