Double-checked locking

Double-checked locking is the attempt to avoid lock acquisition overhead by first checking the locking criterion in an unsafe manner before taking the lock. This is strongly discouraged, since it may behave differently, or not work at all, across memory models.

See also Java memory model.

Get Oracle JRockit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.