From 8907daf65f91fbb537b5d71e01b48c6d2bc275e2 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 9 Dec 2012 08:53:42 -0600 Subject: [PATCH] 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! --- collects/tests/drracket/private/drracket-test-util.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/tests/drracket/private/drracket-test-util.rkt b/collects/tests/drracket/private/drracket-test-util.rkt index 8f3d5533a0..248f5f0fcd 100644 --- a/collects/tests/drracket/private/drracket-test-util.rkt +++ b/collects/tests/drracket/private/drracket-test-util.rkt @@ -242,7 +242,8 @@ (define (queue-callback/res thunk) (not-on-eventspace-handler-thread 'queue-callback/res) (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)) (when (exn? res) (raise res)) (apply values res)))