I don't think SamLowry's solution to Exercise 3.19 is correct. A cycle constructed as below, for example, is not properly detected. (define a-cycle '((a . #f) b)) (set-cdr! (car a-cycle) (car a-cycle)) (cycle? a-cycle) ; this should return #t
I've also wondered about Exercise 3.42 and Sam's explanation makes sense to me as well. So, if I understand this correctly ... If I have some object A created by (define A (make-account 10)) And if A happened to have several worker threads each of the calling protected-withdraw, then these calls of protected-withdraw may not be serialized. Correct?