mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parallel Threads


From: Glenn Takanishi
Subject: Parallel Threads
Date: Sat, 28 Jan 2023 02:36:03 +0000

Jan 27 2023

Hi!

I using Mit-scheme 12.1 trying to use the program "thread.scm" in the runtime directory.  This program has the procedure "make-thread" in it.  But when I tried to run a test with the following program below, it failed with the error message "Unbound variable: make-thread".

--------------------------------------------

(declare (usual-integrations))                                               
                                                                                
;; (load "/usr/local/mit-scheme/lib/mit-scheme/runtime/thread.scm")             
                                                                                
(define (fib n)                                                                 
     (if (< n 2) n                                                              
        (+ (fib (- n 1)) (fib (- n 2)))))                      

                                                                             
(define (async-fib n)                                                           
   (make-thread (lambda () (fib n))))                                           
                                                                                
(async-fib 10))

-------------------------------------------------

When I ran the program above, uncommenting the line invoking the load for thread.scm, the program failed with ";Unbound variable: state-space:local"

I wondering why this threads extension is not documented as the thread.scm program looks good.  I'd like to see how this runs.

Can you tell me what I need to add to the test code above to get it to run.

Thanks,

Glenn 








reply via email to

[Prev in Thread] Current Thread [Next in Thread]