Java: Synchronized and Locks Question Why keep remote payment calls outside the lock? (Click to reveal answer) Answer To avoid serializing slow I/O and destroying throughput. Locks should protect the shortest possible shared-state mutation. Holding a lock during remote HTTP or database work turns latency into contention and blocks unrelated requests. Additional NotesWhy keep remote payment calls outside the lock? Track: Java Topic: Java Threading Focus: Synchronized and Locks Topics: Java Java Threading Synchronized and Locks