Re: maybe-commit fails unconditionally
Robert Ransom <[email protected]> Sat, 24 Oct 2009 07:39:31 -0700
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Oct 23, 2009 at 14:13, Roderic Morris <[email protected]> wrote: > maybe-commit from the low-proposals package seems to always throw an > exception, claiming that there is no proposal, even when used inside > e.g. ensure-atomicity. > > (current-proposal) => #f > (ensure-atomicity (current-proposal)) => #(#t #(#f) #(#f) #f) > > (maybe-commit) => assertion-violation: no current proposal > (ensure-atomicity (maybe-commit)) => assertion-violation: no current > proposal > > > -Roderic > maybe-commit clears the current proposal, whether the commit succeeds or fails: > (ensure-atomicity (display (maybe-commit)) (display (current-proposal))) #t#f assertion-violation: no current proposal [maybe-commit] > (define p (cons #f #f)) ; no values returned > (ensure-atomicity (provisional-car p) (set-car! p (cons #t #t)) (display (maybe-commit)) (display (current-proposal))) #f#f assertion-violation: no current proposal [maybe-commit] The assertion-violation is produced by the call to maybe-commit within call-ensuring-atomicity, the function which ensure-atomicity wraps.