From 1e212d78a467b43b7970b132e5da6873891070c3 Mon Sep 17 00:00:00 2001 From: sperber Date: Mon, 28 May 2001 13:31:01 +0000 Subject: [PATCH] Bug fix: I had forgotten to mark the thread-cell value environment as read-only when it's passed on to a spawned thread. Do that now. --- scheme/rts/thread.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scheme/rts/thread.scm b/scheme/rts/thread.scm index 9b5a47f..dd77f38 100644 --- a/scheme/rts/thread.scm +++ b/scheme/rts/thread.scm @@ -549,6 +549,7 @@ ; scheduler. (define (spawn thunk . id) + (set-thread-own-values?! (current-thread) #f) (apply spawn-on-scheduler (thread-scheduler (current-thread)) thunk @@ -557,11 +558,13 @@ (define (spawn-on-root thunk . id) (if (root-scheduler) - (apply spawn-on-scheduler - (root-scheduler) - thunk - (thread-cell-values (current-thread)) - id) + (begin + (set-thread-own-values?! (current-thread) #f) + (apply spawn-on-scheduler + (root-scheduler) + thunk + (thread-cell-values (current-thread)) + id)) (thunk))) (define (spawn-on-scheduler scheduler thunk cell-values . id)