From e7f7e9ed8ff65eb7a783a2eebddb594fba4ffe43 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Tue, 5 Jun 2018 12:51:06 -0700 Subject: [PATCH] Serialize access to thread/properties via thread-get, thread-put./fetch 69 --- src/runtime/thread.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/runtime/thread.scm b/src/runtime/thread.scm index e42fee54e..9c097fb61 100644 --- a/src/runtime/thread.scm +++ b/src/runtime/thread.scm @@ -102,11 +102,15 @@ USA. (define (thread-get thread property) (guarantee thread? thread 'thread-get) - (1d-table/get (thread/properties thread) property #f)) + (without-interrupts + (lambda () + (1d-table/get (thread/properties thread) property #f)))) (define (thread-put! thread property value) (guarantee thread? thread 'thread-put!) - (1d-table/put! (thread/properties thread) property value)) + (without-interrupts + (lambda () + (1d-table/put! (thread/properties thread) property value)))) (define thread-population) (define first-running-thread) -- 2.25.1