[gambit-list] About thread-suspend!
vasil
vasil.s.d at gmail.com
Wed Mar 4 16:14:26 EST 2009
Hello, Marc!
I am about to write thread-suspend!/thread-resume! functionality.
Found that code like this:
(define-prim (##thread-suspend! thread)
(if (equal? thread (macro-current-thread))
(thread-sleep! +inf.0)
(thread-interrupt! thread (lambda () (thread-sleep! +inf.0)))))
(define-prim (##thread-resume! thread)
(##declare (not interrupts-enabled))
(macro-thread-result-set! thread ##thread-timeout-action!)
(macro-thread-btq-remove-if-in-btq! thread)
(##thread-toq-remove! thread)
(##btq-insert! (macro-run-queue) thread)
#!void)
added to _thread.scm, works fine.
Is there any potential problems?
More information about the Gambit-list
mailing list