sync bug eliminated

This commit is contained in:
Matthias Felleisen 2010-11-05 21:25:17 -04:00
parent 28fc8a3eef
commit 0f856dede5
2 changed files with 5 additions and 3 deletions

View File

@ -16,7 +16,7 @@
;; -> World
(define/public (last)
(define result (sync #;yield end:ch)) ;; bug?
(define result (yield end:ch))
(if (exn? result) (raise result) result))
(field [dr:cust (current-custodian)])

View File

@ -5,7 +5,6 @@
#| TODO:
-- check that on-release is only defined if on-key is defined
-- yield instead of sync
-- run callbacks in user eventspace
-- make timer fire just once; restart after on-tick callback finishes
-- take out counting; replace by 0.25 delay
@ -338,5 +337,8 @@
(define esp (make-eventspace))
(define thd (eventspace-handler-thread esp))
(with-handlers ((exn:break? (lambda (x) (break-thread thd))))
(define obj:ch (make-channel))
(parameterize ([current-eventspace esp])
(send (o) last))))
(queue-callback (lambda () (channel-put obj:ch (o)))))
(send (channel-get obj:ch) last)))