Account A sends money to B while B sends money to A, each transfer locking both accounts — and the program freezes. Explain why and fix it without a global lock.
Account A sends money to B while B sends money to A, each transfer locking both accounts — and the program freezes. Explain why and fix it without a global lock.
Opens with the full question.