From: Matt Birkholz Date: Wed, 13 Aug 2014 04:03:12 +0000 (-0700) Subject: Fluidize (runtime thread) internal root-continuation-default. X-Git-Tag: mit-scheme-pucked-9.2.12~401^2~3 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=98cb1257dbf8c3a317dc82e0ed81ea3db0ededa3;p=mit-scheme.git Fluidize (runtime thread) internal root-continuation-default. --- diff --git a/src/runtime/thread.scm b/src/runtime/thread.scm index 35fcd6edd..5706478d4 100644 --- a/src/runtime/thread.scm +++ b/src/runtime/thread.scm @@ -98,6 +98,7 @@ USA. (define root-continuation-default) (define (initialize-package!) + (set! root-continuation-default (make-fluid #f)) (initialize-error-conditions!) (set! thread-population (make-population)) (set! first-running-thread #f) @@ -139,7 +140,8 @@ USA. create-thread)) (call-with-current-continuation (lambda (return) - (%within-continuation (or root-continuation root-continuation-default) + (%within-continuation (or root-continuation + (fluid root-continuation-default)) #t (lambda () (fluid-let ((state-space:local (make-state-space))) @@ -153,15 +155,15 @@ USA. (exit-current-thread (thunk)))))))) (define (create-thread-continuation) - root-continuation-default) + (fluid root-continuation-default)) (define (with-create-thread-continuation continuation thunk) (if (not (continuation? continuation)) (error:wrong-type-argument continuation "continuation" with-create-thread-continuation)) - (fluid-let ((root-continuation-default continuation)) - (thunk))) + (let-fluid root-continuation-default continuation + thunk)) (define (current-thread) (or first-running-thread