From d0b5c2732b457162360dc41a5ffbca3877151e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Fri, 14 Oct 2016 07:10:02 +0000 Subject: [PATCH] Performance improvement, less maintenance loops --- lib/MySQL_Thread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index d25513597..612538cf7 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -2256,8 +2256,10 @@ __run_skip_1a: spin_wrunlock(&thread_mutex); usleep(c*1000); spin_wrlock(&thread_mutex); + // we enter in maintenance loop only if c is set + // when threads are signaling each other, there is no need to set maintenance_loop + maintenance_loop=true; } - maintenance_loop=true; } continue; }