adjust the synchronization in check syntax for reading doc results to
cope with the case where the thread has been killed (the nacks are apparently not triggered on thread death in some cases) (optimistically) closes PR 12427
This commit is contained in:
parent
2899fd0903
commit
8f12372b17
|
@ -22,7 +22,7 @@
|
|||
(thread
|
||||
(λ ()
|
||||
(let loop ()
|
||||
(define-values (binding-info resp-chan nack-evt) (apply values (channel-get req-chan)))
|
||||
(define-values (binding-info resp-chan nack-evt requesting-thread) (apply values (channel-get req-chan)))
|
||||
(define xref (force delayed-xref))
|
||||
(define resp
|
||||
(and xref
|
||||
|
@ -36,7 +36,8 @@
|
|||
path
|
||||
tag)))))))))
|
||||
(sync (channel-put-evt resp-chan resp)
|
||||
nack-evt)
|
||||
nack-evt
|
||||
(thread-dead-evt requesting-thread))
|
||||
(loop)))))
|
||||
|
||||
;; this function is called from a thread that might be killed
|
||||
|
@ -47,5 +48,5 @@
|
|||
(nack-guard-evt
|
||||
(λ (nack-evt)
|
||||
(define resp-chan (make-channel))
|
||||
(channel-put req-chan (list binding-info resp-chan nack-evt))
|
||||
(channel-put req-chan (list binding-info resp-chan nack-evt (current-thread)))
|
||||
resp-chan))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user