Email list hosting service & mailing list manager

Re: Bug fix Andre van Tonder (12 Jun 2004 01:50 UTC)
Re: Bug fix Matthias Radestock (12 Jun 2004 07:21 UTC)
Re: Bug fix Andre van Tonder (12 Jun 2004 15:07 UTC)

Re: Bug fix Andre van Tonder 12 Jun 2004 15:07 UTC

On Sat, 12 Jun 2004, Matthias Radestock wrote:

>> (define (force promise)
>>    (let ((content (unbox (unbox promise))))
>>      (case (car content)
>>        ((eager) (cdr content))
>>        ((lazy)  (let* ((promise* ((cdr content)))
>>                        (content  (unbox (unbox promise))))
>
> Shouldn't that last line use promise*? If so, how come your tests pass?

No.  It is correct as it stands.  The evaluation of ((cdr content)) in the
previous line may update the content of the original promise passed to
*force* in case of reentrancy.  This is exact what happens in reentrancy
test 3 contributed by John Shutt.

Regards
Andre