Added thread-yield

This commit is contained in:
Justin Ethier 2015-12-19 23:44:39 -05:00
parent 5e4ab77f33
commit 72e3a2e91b

View file

@ -1,12 +1,14 @@
(define-library (scheme base)
(export
;; Thread functions. these are not standard, and may be relocated
;; TODO: relocate to (scheme srfi 18) or such
thread?
make-thread
thread-name
thread-specific
thread-specific-set!
thread-start!
thread-yield!
;; END threads
; TODO: need filter for the next two. also, they really belong in SRFI-1, not here
;delete
@ -681,4 +683,7 @@
(let* ((thunk (vector-ref t 1))
(mutator-id (Cyc-spawn-thread! thunk)))
(vector-set! t 2 mutator-id)))
(define (thread-yield!) (thread-sleep! 1))
;; TODO: thread-terminate!
;; TODO: thread-join!
))