aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/thread-tests.el
diff options
context:
space:
mode:
authorEli Zaretskii2017-01-13 18:05:38 +0200
committerEli Zaretskii2017-01-13 18:05:38 +0200
commit26b5426de8a51b88556e1dc4c2c328875f2dfb01 (patch)
treebff3b86b685ac9f4689dda0cadc0ea3830c64c34 /test/src/thread-tests.el
parent9c4d2afaa5786107aa79728b4703296b9289bf0b (diff)
downloademacs-26b5426de8a51b88556e1dc4c2c328875f2dfb01.tar.gz
emacs-26b5426de8a51b88556e1dc4c2c328875f2dfb01.zip
Fix the new condvar test
* test/src/thread-tests.el (threads-condvar-wait): Enlarge the time we sleep in the main thread to let the other thread process notifications.
Diffstat (limited to 'test/src/thread-tests.el')
-rw-r--r--test/src/thread-tests.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el
index 61809e1681b..22ea90727ce 100644
--- a/test/src/thread-tests.el
+++ b/test/src/thread-tests.el
@@ -272,8 +272,9 @@
272 ;; Notify the waiting thread. 272 ;; Notify the waiting thread.
273 (with-mutex cv-mutex 273 (with-mutex cv-mutex
274 (condition-notify threads-condvar t)) 274 (condition-notify threads-condvar t))
275 ;; Allow new-thread to process the notification. 275 ;; Allow new-thread to process the notification. Sleeping for too
276 (sleep-for 0.1) 276 ;; short time here will fail the length test below.
277 (sleep-for 1)
277 ;; Make sure the thread is still there. This used to fail due to 278 ;; Make sure the thread is still there. This used to fail due to
278 ;; a bug in thread.c:condition_wait_callback. 279 ;; a bug in thread.c:condition_wait_callback.
279 (should (thread-alive-p new-thread)) 280 (should (thread-alive-p new-thread))