From a27c1c9f0a09b614309c08c67eb238c3e4ebcb26 Mon Sep 17 00:00:00 2001 From: John Sully Date: Sun, 17 Nov 2019 15:39:47 -0500 Subject: [PATCH] Revert "Debug sleep should apply to all threads" This reverts commit b8cc7e2b9c9223de33c1d6513decb80261998461 [formerly 41b678814b2c2ff93935b57e630028aaf2e9ae62]. Former-commit-id: 3ae75c2d2bd952d0a075b9ba257a08f962fe0739 --- src/debug.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/debug.cpp b/src/debug.cpp index 9854d0fd4..234f197be 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -595,19 +595,9 @@ NULL double dtime = strtod(szFromObj(c->argv[2]),NULL); long long utime = dtime*1000000; struct timespec tv; + tv.tv_sec = utime / 1000000; tv.tv_nsec = (utime % 1000000) * 1000; - - // Ensure all threads sleep - for (int iel = 0; iel < cserver.cthreads; ++iel) - { - if (iel == ielFromEventLoop(serverTL->el)) - continue; // we will sleep ourselves below - aePostFunction(g_pserver->rgthreadvar[iel].el, [tv]{ - nanosleep(&tv, NULL); - }); - } - nanosleep(&tv, NULL); addReply(c,shared.ok); } else if (!strcasecmp(szFromObj(c->argv[1]),"set-active-expire") &&