From e4d21335cf84e0de61f1f7aa2ebc0cc26757f10d Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 18 Dec 2015 22:37:48 -0500 Subject: [PATCH] Added thread-start! --- scheme/base.sld | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scheme/base.sld b/scheme/base.sld index a2834fda..840debbd 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -6,7 +6,7 @@ thread-name thread-specific thread-specific-set! - ;thread-start! + thread-start! ;; END threads ; TODO: need filter for the next two. also, they really belong in SRFI-1, not here ;delete @@ -675,12 +675,10 @@ (define (thread-name t) (vector-ref t 3)) (define (thread-specific t) (vector-ref t 4)) (define (thread-specific-set! t obj) (vector-set! t 4 obj)) - ; TODO: ; current-thread - not sure how to look this up yet... may need a global list of running threads -; (define (thread-start! t) -; (let* ((thunk (vector-ref t 1)) -; (mutator-id (Cyc-thread-start! thunk))) -; (vector-set! t 2 mutator-id))) - + (define (thread-start! t) + (let* ((thunk (vector-ref t 1)) + (mutator-id (Cyc-spawn-thread! thunk))) + (vector-set! t 2 mutator-id))) ))