Replace the fluid-let with its expansion into a dynamic-wind, which
works only if the bootstrap proceeds in one thread and thus
thread-local values for boot-inits are not needed.
(define (load-with-boot-inits! . arguments)
(receive (value inits)
- (fluid-let ((boot-inits '()))
- (let ((value (apply load arguments)))
- (values value (reverse! boot-inits))))
+ (let ((inner '()))
+ (define (swap!)
+ (set! boot-inits (set! inner (set! boot-inits)))
+ unspecific)
+ (dynamic-wind
+ swap!
+ (lambda ()
+ (let ((value (apply load arguments)))
+ (values value (reverse! boot-inits))))
+ swap!))
(for-each (lambda (init) (init))
inits)
value))