From b60772ef77e0ec37d9a1e702019bbbde12964ac5 Mon Sep 17 00:00:00 2001 From: Sever Topan Date: Mon, 26 Mar 2018 17:15:27 -0400 Subject: [PATCH] Continue with Regular Posting on Wakeup Failure. --- include/thread_pool/thread_pool.hpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/thread_pool/thread_pool.hpp b/include/thread_pool/thread_pool.hpp index a445a6da..0f1c335a 100644 --- a/include/thread_pool/thread_pool.hpp +++ b/include/thread_pool/thread_pool.hpp @@ -208,13 +208,8 @@ inline bool GenericThreadPool::tryPostImpl(Handler&& handler, size_ // processing the items in its queue. We then re-try posting our current task. if (success) return true; - else - { - if (failedWakeupRetryCap == 0) - return false; - + else if (failedWakeupRetryCap > 0) return tryPostImpl(std::forward(handler), failedWakeupRetryCap - 1); - } } }