[jboss-cvs] JBossAS SVN: r93150 - in projects/jboss-cl/branches/Branch_2_0/classloader/src: main/java/org/jboss/classloader/spi/base and 3 other directories.
David M. Lloyd
david.lloyd at redhat.com
Thu Sep 3 12:06:54 EDT 2009
On 09/03/2009 03:13 AM, jboss-cvs-commits at lists.jboss.org wrote:
> Author: wolfc
> + private void waitForIt() throws InterruptedException
> + {
> + if(!block) return;
> + synchronized (this)
> + {
> + while(block)
> + wait();
> + }
> + }
> +}
This is double-checked locking - not allowed, period. Why not just use a
single synchronized block over all, and forget the condition and the
ReentrantLock crap? Seems to me that you'll get the same effective result.
- DML
More information about the jboss-cvs-commits
mailing list