fix for PR 8496
svn: r5438
This commit is contained in:
parent
69a6c8a5cb
commit
9bcd4aafe7
|
@ -1188,6 +1188,10 @@ TODO
|
|||
(update-running #f)
|
||||
(send context set-breakables #f #f)
|
||||
|
||||
;; after this returns, future event dispatches
|
||||
;; will use the user's break parameterization
|
||||
(initialize-dispatch-handler)
|
||||
|
||||
;; let init-thread procedure return,
|
||||
;; now that parameters are set
|
||||
(semaphore-post init-thread-complete)
|
||||
|
@ -1290,8 +1294,7 @@ TODO
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; initialize-paramters : (listof snip-class%) -> void
|
||||
(define/private initialize-parameters ; =User=
|
||||
(λ (snip-classes)
|
||||
(define/private (initialize-parameters snip-classes) ; =User=
|
||||
|
||||
(current-language-settings user-language-settings)
|
||||
(error-value->string-handler drscheme-error-value->string-handler)
|
||||
|
@ -1313,7 +1316,9 @@ TODO
|
|||
(current-output-port (get-out-port))
|
||||
(current-error-port (get-err-port))
|
||||
(current-value-port (get-value-port))
|
||||
(current-input-port (get-in-box-port))
|
||||
(current-input-port (get-in-box-port)))
|
||||
|
||||
(define/private (initialize-dispatch-handler) ;;; =User=
|
||||
(let* ([primitive-dispatch-handler (event-dispatch-handler)])
|
||||
(event-dispatch-handler
|
||||
(rec drscheme-event-dispatch-handler ; <= a name for #<...> printout
|
||||
|
@ -1354,7 +1359,7 @@ TODO
|
|||
(primitive-dispatch-handler eventspace)])]
|
||||
[else
|
||||
; =User=, =Non-Handler=, =No-Breaks=
|
||||
(primitive-dispatch-handler eventspace)])))))))
|
||||
(primitive-dispatch-handler eventspace)]))))))
|
||||
|
||||
(define/public (new-empty-console)
|
||||
(queue-user/wait
|
||||
|
|
|
@ -960,25 +960,24 @@ module browser threading seems wrong.
|
|||
|
||||
;; break-callback : -> void
|
||||
(define/public (break-callback)
|
||||
(let ([thread-to-break (weak-box-value thread-to-break-box)]
|
||||
[custodian-to-kill (weak-box-value custodian-to-kill-box)])
|
||||
(cond
|
||||
[(or (not (weak-box-value thread-to-break-box))
|
||||
(not (weak-box-value custodian-to-kill-box)))
|
||||
[(or (not thread-to-break)
|
||||
(not custodian-to-kill))
|
||||
(bell)]
|
||||
[offer-kill?
|
||||
(if (user-wants-kill?)
|
||||
(let ([thd (weak-box-value thread-to-break-box)])
|
||||
(when thd
|
||||
(break-thread thd)))
|
||||
(let ([cust (weak-box-value custodian-to-kill-box)])
|
||||
(when cust
|
||||
(custodian-shutdown-all cust))))]
|
||||
(when thread-to-break
|
||||
(break-thread thread-to-break))
|
||||
(when custodian-to-kill
|
||||
(custodian-shutdown-all custodian-to-kill)))]
|
||||
[else
|
||||
(let ([thd (weak-box-value thread-to-break-box)])
|
||||
(when thd
|
||||
(break-thread thd)))
|
||||
(when thread-to-break
|
||||
(break-thread thread-to-break))
|
||||
;; only offer a kill the next time if
|
||||
;; something got broken.
|
||||
(set! offer-kill? #t)]))
|
||||
(set! offer-kill? #t)])))
|
||||
|
||||
;; user-wants-kill? : -> boolean
|
||||
;; handles events, so be sure to check state
|
||||
|
|
Loading…
Reference in New Issue
Block a user