[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/3] new test case for I/O switching
From: |
Tom Tromey |
Subject: |
[PATCH 3/3] new test case for I/O switching |
Date: |
Wed, 15 Aug 2012 08:49:58 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
This adds a new test case that demonstrates that Emacs task-switches
while waiting for I/O.
---
test/automated/threads.el | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/test/automated/threads.el b/test/automated/threads.el
index b09e269..4c1afbd 100644
--- a/test/automated/threads.el
+++ b/test/automated/threads.el
@@ -162,4 +162,17 @@
(thread-join thr))
t)))
+(defun threads-test-io-switch ()
+ (setq threads-test-global 23))
+
+(ert-deftest threads-io-switch ()
+ "test that accept-process-output causes thread switch"
+ (should
+ (progn
+ (setq threads-test-global nil)
+ (make-thread #'threads-test-io-switch)
+ (while (not threads-test-global)
+ (accept-process-output nil 1))
+ threads-test-global)))
+
;;; threads.el ends here
--
1.7.7.6
- [PATCH 3/3] new test case for I/O switching,
Tom Tromey <=