cs: fix build with non-threaded scheme

This commit is contained in:
Matthew Flatt 2018-10-08 15:27:53 -06:00
parent 076684b123
commit 3acb1a5162
2 changed files with 32 additions and 31 deletions

View File

@ -135,6 +135,7 @@
;; ----------------------------------------
(when (threaded?)
(let* ([place-symbols (make-hasheq)]
[register-place-symbol!
(lambda (sym proc)
@ -164,7 +165,7 @@
(place-channel-put pl f)
(test (bytes-ref content 1) (place-channel-get pl))
(test (bytes-ref content 2) (read-byte f))
(close-input-port f)))))
(close-input-port f))))))
;; Thread can be GCed if it's block on a place channel with no writer
(let ()

View File

@ -47,7 +47,7 @@
;; engine-based concurrency
(define-syntax-rule (with-global-lock e ...)
(with-interrupts-disabled
e))]
e ...))]
[else
;; Using a Chez Scheme build with thread support; make hash-table
;; access thread-safe at that level for `eq?`- and `eqv?`-based