[JENKINS-22558] Avoid deadlocks by using RentrantLock#tryLock() instead of synchronized.
Merge pull request #89 from recampbell/JENKINS-22558

[JENKINS-22558] Avoid deadlocks by using RentrantLock#tryLock() instead of synchronized.