From c9a062d44807803f1cdfcfe62d49ad1f18162baa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 29 Aug 2017 16:12:39 +0200 Subject: Bump BLODA timeout to 350ms --- libbutl/process.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'libbutl/process.cxx') diff --git a/libbutl/process.cxx b/libbutl/process.cxx index e4ccf9e..9169841 100644 --- a/libbutl/process.cxx +++ b/libbutl/process.cxx @@ -1453,7 +1453,7 @@ namespace butl il.unlock (); l.unlock (); - DWORD r (WaitForSingleObject (pi.hProcess, 250)); + DWORD r (WaitForSingleObject (pi.hProcess, 350)); if (r == WAIT_OBJECT_0 && GetExitCodeProcess (pi.hProcess, &r) && @@ -1461,20 +1461,17 @@ namespace butl { timestamp now (system_clock::now ()); - // Assume we were waiting for 250 ms if the time adjustment is + // Assume we have waited the full amount if the time adjustment is // detected. // - duration d (now > st ? now - st : 250ms); + duration d (now > st ? now - st : 350ms); - // Re-spawn the process if timeout is not fully exhausted. + // If timeout is not fully exhausted, re-lock the mutex, revert + // handles to inheritable state and re-spawn the process. // if (timeout > d) { timeout -= d; - - // Re-lock the mutex and revert handles to inheritable state - // prior to re-spawning the child process. - // l.lock (); il.lock (); continue; -- cgit v1.1