bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32986: 27.0.50; unexpected delay in while-no-input + accept-process-


From: Dmitry Gutov
Subject: bug#32986: 27.0.50; unexpected delay in while-no-input + accept-process-output
Date: Tue, 11 Dec 2018 20:09:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Thunderbird/64.0

On 15.10.2018 1:08, João Távora wrote:

    (joaot/time
     (catch 'done
       (progn (make-process :name "test"
                            :filter (lambda (proc string)
                                      (message "Hey %s just got %s" proc string)
                                      (throw 'done nil))
                            :command '("sh" "-c" "sleep 2 && echo bla"))
              (while (sit-for 30))))) ; Took 02.011 seconds and returned nil

It's an interesting alternative to Company's async backend interface, where we have a similar piece of code waiting until either completions are returned or the user types something (in company--fetch-candidates).

Which of course makes sense, given that CAPF has no async calling convention.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]