This commit is contained in:
Oliver Payne 2022-10-31 22:38:29 +00:00
parent c4324dff63
commit 494669f484
1 changed files with 7 additions and 0 deletions

View File

@ -251,3 +251,10 @@
(check-equal? (account1 'balance) 20)
(check-equal? (account2 'balance) 30)))
)
;; 3.49: One scenario where the deadlock avoidance scheme may fail is
;; where we need to get information about the account before deciding
;; if we need to lock it. For example: Peter and Paul share some
;; accounts, and both want to exchange the account with the highest
;; balance with the account with the lowest balance. (Not entirely
;; convinced about this answer.)