From f791cc9247dfac8640c8896bad9d9c1a1e70edfc Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sun, 5 Aug 2012 14:13:01 +0300 Subject: [PATCH] test: emacs: call accept-process-output in notmuch-test-wait notmuch-test-wait called sleep-for in a loop to wait unconditionally 0.1 seconds while waiting for process to exit. accept-process-output returns as soon as there is any data available from process, so using it avoids unnecessary fixed delays. Both of these functions run process sentinels. --- test/test-lib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-lib.el b/test/test-lib.el index 5dd6271c..52d99361 100644 --- a/test/test-lib.el +++ b/test/test-lib.el @@ -38,7 +38,7 @@ (defun notmuch-test-wait () "Wait for process completion." (while (get-buffer-process (current-buffer)) - (sleep-for 0.1))) + (accept-process-output nil 0.1))) (defun test-output (&optional filename) "Save current buffer to file FILENAME. Default FILENAME is OUTPUT." -- 2.26.2