added lock propagation to LeaderboardDTOCache and SmartFutureCache

This commit is contained in:
Axel Uhl committed 2013-03-22 00:28:23 +01:00
1 parent 82b464eafe
commit f9292e64c3
3 files changed
+53 -19

No files matched your search

@@ -172,7 +172,10 @@ public class LockUtil {
* will not actually acquire that lock again. This, in particular, has the effect that a read lock
* already held by <code>thread</code> will not have to be acquired again, which in turn avoids a
* read-read deadlock on a fair lock in case another thread is attempting to acquire the corresponding
* write lock before the current thread tries to re-acquire the read lock.
* write lock before the current thread tries to re-acquire the read lock.<p>
*
* Always use this in a <code>try/finally</code> combination where in the <code>finally</code> you call
* {@link #unpropagateLockSetFrom(Thread)}.
*/
public static void propagateLockSetFrom(Thread thread) {
Map<Lock, Integer> otherMap = lockCounts.get(thread);