mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
Added thread-yield
This commit is contained in:
parent
5e4ab77f33
commit
72e3a2e91b
1 changed files with 5 additions and 0 deletions
|
@ -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!
|
||||
))
|
||||
|
|
Loading…
Add table
Reference in a new issue