Always lock them in the same order, one way you could decide the order is on the results of System.identityHashCode(Object)
References:
http://stackoverflow.com/questions/1636399/correctly-synchronizing-equals-in-java
http://download.oracle.com/javase/tutorial/essential/concurrency/atomic.html
Thursday, December 9, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment