Software Engineering KB

Home

❯

02 Programming Languages and Paradigms

❯

04 Concurrency

❯

01 Concept

❯

Double Checked Locking

Double-Checked Locking

Feb 10, 20261 min read

  • concurrency
  • patterns
  • double-checked-locking

Double-Checked Locking

← Back to Concurrency Hazards & Patterns

A pattern for lazy initialization in concurrent code: check if initialized (no lock), acquire lock, check again (with lock), then initialize. Historically broken in many languages due to memory model issues (instruction reordering). Requires volatile/atomic memory ordering to be correct.

Key Properties

  • Lazy Initialization Pattern
  • Memory Model Pitfalls

concurrency patterns double-checked-locking


Graph View

  • Double-Checked Locking
  • Key Properties

Backlinks

  • Concurrency Hazards & Patterns
  • Lazy Initialization Pattern
  • Memory Model Pitfalls

Created with Quartz v4.5.2 © 2026

  • GitHub