Probably the right choice is to install a flush handler with the
current plumber:
(define (thread/wait proc)
(define t (thread proc))
(plumber-add-flush! (current-plumber)
(lambda (h) (thread-wait t)))
t)
That adds a `thread-wait` in the same sense as flushing a
What is the best way to create threads that will prevent a program from
exiting until they have completed their work? I'd like to be able to do
this implicitly, without cooperation from the main thread.
My first experiment uses `shift` to insert uses of `thread-wait` after the
rest of the
2 matches
Mail list logo