Fix the result-history vs console race condition
part of darcs patch Sun Sep 18 14:34:41 EEST 2005 Eric Knauel <knauel@informatik.uni-tuebingen.de>
This commit is contained in:
parent
7c5db88473
commit
2ff942c985
|
@ -77,8 +77,9 @@
|
|||
(lambda ()
|
||||
(sync
|
||||
(wrap (result-buffer-other-object-has-focus-rv)
|
||||
(lambda (ignore)
|
||||
(pause-console-output console)))))))
|
||||
(lambda (ack-channel)
|
||||
(pause-console-output console)
|
||||
(send ack-channel 'ignore)))))))
|
||||
|
||||
(define (make-console-viewer console buffer)
|
||||
(lambda (message)
|
||||
|
|
|
@ -133,8 +133,10 @@
|
|||
(make-channel))
|
||||
|
||||
(define (signal-result-buffer-object-change)
|
||||
(debug-message "signal-result-buffer-object-change")
|
||||
(send result-buffer-changed-channel 'ignore))
|
||||
(let ((ack-channel (make-channel)))
|
||||
(debug-message "signal-result-buffer-object-change")
|
||||
(send result-buffer-changed-channel ack-channel)
|
||||
(receive ack-channel)))
|
||||
|
||||
(define (spawn-result-buffer-surveillant)
|
||||
(spawn
|
||||
|
@ -144,11 +146,14 @@
|
|||
(wrap (receive-rv result-buffer-changes-subscribers)
|
||||
(lambda (answer-channel)
|
||||
(debug-message "result-buffer-surveillant 1")
|
||||
(receive result-buffer-changed-channel)
|
||||
(send answer-channel 'ignore)
|
||||
(sync (wrap
|
||||
(receive-rv result-buffer-changed-channel)
|
||||
(lambda (ack-channel)
|
||||
(send answer-channel ack-channel))))
|
||||
(lp)))
|
||||
(wrap (receive-rv result-buffer-changed-channel)
|
||||
(lambda (ignore)
|
||||
(lambda (ack-channel)
|
||||
(send ack-channel 'no-one-is-interested)
|
||||
(debug-message "result-buffer-surveillant 2")
|
||||
(lp))))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue