cs: fix build with non-threaded scheme
This commit is contained in:
parent
076684b123
commit
3acb1a5162
|
@ -135,6 +135,7 @@
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
|
(when (threaded?)
|
||||||
(let* ([place-symbols (make-hasheq)]
|
(let* ([place-symbols (make-hasheq)]
|
||||||
[register-place-symbol!
|
[register-place-symbol!
|
||||||
(lambda (sym proc)
|
(lambda (sym proc)
|
||||||
|
@ -164,7 +165,7 @@
|
||||||
(place-channel-put pl f)
|
(place-channel-put pl f)
|
||||||
(test (bytes-ref content 1) (place-channel-get pl))
|
(test (bytes-ref content 1) (place-channel-get pl))
|
||||||
(test (bytes-ref content 2) (read-byte f))
|
(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
|
;; Thread can be GCed if it's block on a place channel with no writer
|
||||||
(let ()
|
(let ()
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
;; engine-based concurrency
|
;; engine-based concurrency
|
||||||
(define-syntax-rule (with-global-lock e ...)
|
(define-syntax-rule (with-global-lock e ...)
|
||||||
(with-interrupts-disabled
|
(with-interrupts-disabled
|
||||||
e))]
|
e ...))]
|
||||||
[else
|
[else
|
||||||
;; Using a Chez Scheme build with thread support; make hash-table
|
;; Using a Chez Scheme build with thread support; make hash-table
|
||||||
;; access thread-safe at that level for `eq?`- and `eqv?`-based
|
;; access thread-safe at that level for `eq?`- and `eqv?`-based
|
||||||
|
|
Loading…
Reference in New Issue
Block a user