cs & thread: fix atomic timeouts
Commit 9a3eb15d8b
broke atomic-timeout handling. As aresult, for
example, using the scroll thumb on Mac OS could freeze DrRacket as
long as something is running for a canvas refresh.
This commit is contained in:
parent
db9c06aff1
commit
7438586cf0
|
@ -12507,18 +12507,21 @@
|
|||
(poll-and-select-thread! new-leftover-ticks_0))))
|
||||
(begin
|
||||
(add-end-atomic-callback! engine-timeout)
|
||||
(loop_0 e_2 void)))))))))))
|
||||
(loop_0 e_2 check-for-atomic-timeout)))))))))))
|
||||
(loop_0 e_0 check-break-prefix))))
|
||||
(define check-break-prefix
|
||||
(lambda ()
|
||||
(begin
|
||||
(current-thread-now-running!)
|
||||
(1/check-for-break)
|
||||
(if (unsafe-place-local-ref cell.4)
|
||||
(if (positive? (current-atomic))
|
||||
(|#%app| (unsafe-place-local-ref cell.4) #f)
|
||||
(void))
|
||||
(void)))))
|
||||
(check-for-atomic-timeout))))
|
||||
(define check-for-atomic-timeout
|
||||
(lambda ()
|
||||
(if (unsafe-place-local-ref cell.4)
|
||||
(if (positive? (current-atomic))
|
||||
(|#%app| (unsafe-place-local-ref cell.4) #f)
|
||||
(void))
|
||||
(void))))
|
||||
(define maybe-done
|
||||
(lambda (callbacks_0)
|
||||
(if (pair? callbacks_0)
|
||||
|
|
|
@ -174,11 +174,14 @@
|
|||
;; where host-system interrupts are not disabled (i.e.,
|
||||
;; don't use `engine-block` instead of `engine-timeout`):
|
||||
(add-end-atomic-callback! engine-timeout)
|
||||
(loop e void)])])))))
|
||||
(loop e check-for-atomic-timeout)])])))))
|
||||
|
||||
(define (check-break-prefix)
|
||||
(current-thread-now-running!)
|
||||
(check-for-break)
|
||||
(check-for-atomic-timeout))
|
||||
|
||||
(define (check-for-atomic-timeout)
|
||||
(when atomic-timeout-callback
|
||||
(when (positive? (current-atomic))
|
||||
(atomic-timeout-callback #f))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user