Serialize access to thread/properties via thread-get, thread-put./fetch 69
authorMatt Birkholz <matt@birchwood-abbey.net>
Tue, 5 Jun 2018 19:51:06 +0000 (12:51 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Tue, 5 Jun 2018 19:51:06 +0000 (12:51 -0700)
src/runtime/thread.scm

index e42fee54e6c39b2bbe0a98909cc2bb009cc2a13a..9c097fb618aeeb50d75c9cc4f429d30a75d35eaa 100644 (file)
@@ -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))))
 \f
 (define thread-population)
 (define first-running-thread)