vanzin commented on issue #24072: [SPARK-27112] : Create a resource ordering 
between threads to resolve the deadlocks encountered …
URL: https://github.com/apache/spark/pull/24072#issuecomment-472658465
 
 
   BTW if the "two locks need to be held" thing is really needed in multiple 
places, might be good to have a helper function, e.g.
   
   ```
   def withLock[T](fn: => T): T = lock1.synchronized { lock2.synchronized { fn 
} }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to