Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/2957#issuecomment-60583305
  
    Yes I get that this is not just about preventing an NPE, which is what I 
thought the intent was originally. I think this does not go far enough to 
prevent the problem though.
    
    - Task A executes on thread T
    - thread is set to T
    - Another thread tries to cancel() A but yields before calling it
    - Task A completes
    - thread is null
    - Task B runs on thread T
    - thread is set to T
    - Call to cancel() continues and interrupts B executing on T
    
    A local var doesn't help this. Is this the real problem? or will this never 
happen for another reason? the locks have no effect on this sequence.


---
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]

Reply via email to