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.
This commit is contained in:
parent
b0d2b0e318
commit
1e212d78a4
|
@ -549,6 +549,7 @@
|
||||||
; scheduler.
|
; scheduler.
|
||||||
|
|
||||||
(define (spawn thunk . id)
|
(define (spawn thunk . id)
|
||||||
|
(set-thread-own-values?! (current-thread) #f)
|
||||||
(apply spawn-on-scheduler
|
(apply spawn-on-scheduler
|
||||||
(thread-scheduler (current-thread))
|
(thread-scheduler (current-thread))
|
||||||
thunk
|
thunk
|
||||||
|
@ -557,11 +558,13 @@
|
||||||
|
|
||||||
(define (spawn-on-root thunk . id)
|
(define (spawn-on-root thunk . id)
|
||||||
(if (root-scheduler)
|
(if (root-scheduler)
|
||||||
(apply spawn-on-scheduler
|
(begin
|
||||||
(root-scheduler)
|
(set-thread-own-values?! (current-thread) #f)
|
||||||
thunk
|
(apply spawn-on-scheduler
|
||||||
(thread-cell-values (current-thread))
|
(root-scheduler)
|
||||||
id)
|
thunk
|
||||||
|
(thread-cell-values (current-thread))
|
||||||
|
id))
|
||||||
(thunk)))
|
(thunk)))
|
||||||
|
|
||||||
(define (spawn-on-scheduler scheduler thunk cell-values . id)
|
(define (spawn-on-scheduler scheduler thunk cell-values . id)
|
||||||
|
|
Loading…
Reference in New Issue