From 98cb1257dbf8c3a317dc82e0ed81ea3db0ededa3 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Tue, 12 Aug 2014 21:03:12 -0700 Subject: [PATCH] Fluidize (runtime thread) internal root-continuation-default. --- src/runtime/thread.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.25.1