aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 52da3a16b..955302cab 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -440,10 +440,11 @@ retry:
// Wait for call completion.
uint64_t start = current_time_ms();
uint64_t now = start;
+ const uint64_t timeout_ms = flag_debug ? 500 : 20;
for (;;) {
timespec ts = {};
ts.tv_sec = 0;
- ts.tv_nsec = (20 - (now - start)) * 1000 * 1000;
+ ts.tv_nsec = (timeout_ms - (now - start)) * 1000 * 1000;
syscall(SYS_futex, &th->done, FUTEX_WAIT, 0, &ts);
if (__atomic_load_n(&th->done, __ATOMIC_RELAXED))
break;