From: Matt Birkholz <matt@birchwood-abbey.net>
Date: Tue, 5 Jun 2018 19:51:06 +0000 (-0700)
Subject: Serialize access to thread/properties via thread-get, thread-put./fetch 69
X-Git-Tag: mit-scheme-pucked-x11-0.3.1~6^2~1
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e7f7e9ed8ff65eb7a783a2eebddb594fba4ffe43;p=mit-scheme.git

Serialize access to thread/properties via thread-get, thread-put./fetch 69
---

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)