Use headings instead of bold text in index.md #238

This commit is contained in:
Jeroen Meulemeester
2016-01-03 21:14:30 +01:00
parent b6beffec2e
commit 3d642cdad7
66 changed files with 373 additions and 233 deletions

View File

@ -10,14 +10,16 @@ tags:
- Idiom
---
**Intent:** Reduce the overhead of acquiring a lock by first testing the
## Intent
Reduce the overhead of acquiring a lock by first testing the
locking criterion (the "lock hint") without actually acquiring the lock. Only
if the locking criterion check indicates that locking is required does the
actual locking logic proceed.
![alt text](./etc/double_checked_locking_1.png "Double Checked Locking")
**Applicability:** Use the Double Checked Locking pattern when
## Applicability
Use the Double Checked Locking pattern when
* there is a concurrent access in object creation, e.g. singleton, where you want to create single instance of the same class and checking if it's null or not maybe not be enough when there are two or more threads that checks if instance is null or not.
* there is a concurrent access on a method where method's behaviour changes according to the some constraints and these constraint change within this method.