#| -*-Scheme-*-
-$Id: thread.scm,v 1.8 1993/01/29 16:31:20 cph Exp $
+$Id: thread.scm,v 1.9 1993/03/09 23:53:13 cph Exp $
Copyright (c) 1991-1993 Massachusetts Institute of Technology
(let ((thread (make-thread)))
(set-thread/continuation! thread continuation)
(thread-running thread)
- (%within-continuation return true (lambda () thread)))))
+ (%within-continuation (let ((k return)) (set! return #f) k)
+ true
+ (lambda () thread)))))
(set-interrupt-enables! interrupt-mask/all)
(exit-current-thread (thunk))))))))
(set-interrupt-enables! interrupt-mask/all)
(do () (false)))
(run-thread thread*))))
-
+\f
(define (run-thread thread)
(let ((continuation (thread/continuation thread)))
(set-thread/continuation! thread false)
(%maybe-toggle-thread-timer)
(handle-thread-event thread event)
(set-thread/block-events?! thread false)))))))
-\f
+
(define (suspend-current-thread)
(without-interrupts
(lambda ()