From a7f8b0d0ee2d338f352c3502ecd0f92c3ea9ae0d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 26 Dec 2018 19:15:34 +0100 Subject: [PATCH] mingw: be more generous when wrapping up the setitimer() emulation Every once in a while, the Azure Pipeline fails with some semi-random error: timer thread did not terminate timely This error message means that the thread that is used to emulate the setitimer() function did not terminate within 1,000 milliseconds. The most likely explanation (and therefore the one we should assume to be true, according to Occam's Razor) is that the timeout of one second is simply not enough because we try to run so many tasks in parallel. So let's give it ten seconds instead of only one. That should be enough. Signed-off-by: Johannes Schindelin --- compat/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index 29c6c2cae9..517dee27e9 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2404,7 +2404,7 @@ static void stop_timer_thread(void) if (timer_event) SetEvent(timer_event); /* tell thread to terminate */ if (timer_thread) { - int rc = WaitForSingleObject(timer_thread, 1000); + int rc = WaitForSingleObject(timer_thread, 10000); if (rc == WAIT_TIMEOUT) error("timer thread did not terminate timely"); else if (rc != WAIT_OBJECT_0)