Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/2337#discussion_r17800549
--- Diff: core/src/main/scala/org/apache/spark/FutureAction.scala ---
@@ -171,6 +179,8 @@ class ComplexFutureAction[T] extends FutureAction[T] {
// is cancelled before the action was even run (and thus we have no
thread to interrupt).
@volatile private var _cancelled: Boolean = false
+ @volatile private var jobs: Seq[Int] = Nil
--- End diff --
I'm trying to avoid synchonization. Having a mutable list here means I'd
have to synchronize when returning the immutable Seq in `jobIds`; with the
volatile var, I'm only doing read operations on the `Seq`s themselves, so I
don't need to synchronize.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]