[plt-scheme] hitting a race in logging?
I'm hitting slightly weird behavior when I'm logging events, but I
don't yet see why. In DrScheme, the following program sometimes shows
"hello" as expected. But sometimes it doesn't!
;;;;;;
#lang scheme
(define (start-up-debug-printing)
(let ([receiver (make-log-receiver (current-logger) 'debug)])
(void
(thread (lambda ()
(let loop ()
(let ([v (sync receiver)])
(display (vector-ref v 1))
(newline))
(loop)))))))
(start-up-debug-printing)
(log-warning "hello")
;;;;;;
If I press Run three times, the third time does not show output. Am I
using the logging system properly?