make the queue-callback/res function queue low-priority callbacks
This should have been like this all along; I think it can lead to race-conditions with high-priority events. In particular, something might be pending in the event queue and then the test suite might queue a high-priority event to check for it, which could happen before the event that actually does the work that's being checked for!
This commit is contained in:
parent
04fbb02f63
commit
8907daf65f
|
@ -242,7 +242,8 @@
|
||||||
(define (queue-callback/res thunk)
|
(define (queue-callback/res thunk)
|
||||||
(not-on-eventspace-handler-thread 'queue-callback/res)
|
(not-on-eventspace-handler-thread 'queue-callback/res)
|
||||||
(let ([c (make-channel)])
|
(let ([c (make-channel)])
|
||||||
(queue-callback (λ () (channel-put c (with-handlers ((exn:fail? values)) (call-with-values thunk list)))))
|
(queue-callback (λ () (channel-put c (with-handlers ((exn:fail? values)) (call-with-values thunk list))))
|
||||||
|
#f)
|
||||||
(define res (channel-get c))
|
(define res (channel-get c))
|
||||||
(when (exn? res) (raise res))
|
(when (exn? res) (raise res))
|
||||||
(apply values res)))
|
(apply values res)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user