feeley/gambit — pull request #38 by m-i-k-a-e-l (2013-07-12 09:58:27+00:00)
Title: ##thread-status

##thread-status, a general-purpose thread status tool, mostly for debugging purposes.

> (define t (make-thread (lambda () (thread-sleep! 10) 'over)))
> (##thread-status t)
(created)
> (begin (thread-start! t) (##thread-status t))
(starting)
> (##thread-status t)
(running)
> (##thread-status t #t)
(running #<continuation #2>)
> (##thread-status t)
(ended over)
> (define t (thread-start! (make-thread (lambda () (raise "error")))))
> (##thread-status t)
(ended/exception "error")