field is
static Printer getInstance() call round: 0 / 3
๐Ÿงต T1idle
got: โ€”
shared static field
instance = null
๐Ÿญ instances created0
๐Ÿ”’ lock acquisitions0
๐Ÿ”‘ lockfree
๐Ÿงต T2idle
got: โ€”
Two threads, one instant
Press โ–ถ Both call getInstance() โ€” T1 and T2 call it at the same moment.
โ–ธ Run each mode once. The scoreboard fills in and the winner becomes obvious: one instance, zero locks, still lazy.