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?
Afficher les réponses par date