Example: double-checked locking pattern