From 576e859fe0b327bc54f82497a24d71e78b2a2c2d Mon Sep 17 00:00:00 2001 From: rockerbacon Date: Sat, 14 Mar 2020 14:38:45 -0300 Subject: [PATCH 1/2] Changed headers include path from absolute to relative --- include/thread_pool.hpp | 2 +- include/thread_pool/thread_pool.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/thread_pool.hpp b/include/thread_pool.hpp index d8b0bc4b..0f2e71b2 100644 --- a/include/thread_pool.hpp +++ b/include/thread_pool.hpp @@ -1,3 +1,3 @@ #pragma once -#include +#include "thread_pool/thread_pool.hpp" diff --git a/include/thread_pool/thread_pool.hpp b/include/thread_pool/thread_pool.hpp index 4c79fdbf..0bc24568 100644 --- a/include/thread_pool/thread_pool.hpp +++ b/include/thread_pool/thread_pool.hpp @@ -1,9 +1,9 @@ #pragma once -#include -#include -#include -#include +#include "fixed_function.hpp" +#include "mpmc_bounded_queue.hpp" +#include "thread_pool_options.hpp" +#include "worker.hpp" #include #include From 24ae2e6bbe7f816c2919640c1f7774eb136f09ec Mon Sep 17 00:00:00 2001 From: rockerbacon Date: Sat, 14 Mar 2020 14:45:31 -0300 Subject: [PATCH 2/2] Cleaned test warnings --- tests/fixed_function.t.cpp | 10 +++++----- tests/thread_pool_options.t.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/fixed_function.t.cpp b/tests/fixed_function.t.cpp index ecba7fea..f74950a2 100644 --- a/tests/fixed_function.t.cpp +++ b/tests/fixed_function.t.cpp @@ -115,11 +115,11 @@ TEST(FixedFunction, allocDealloc) } ASSERT_EQ(def + cop + mov, destroyed); - ASSERT_EQ(2, def); - ASSERT_EQ(0, cop); - ASSERT_EQ(6, mov); - ASSERT_EQ(0, cop_ass); - ASSERT_EQ(0, mov_ass); + ASSERT_EQ(2llu, def); + ASSERT_EQ(0llu, cop); + ASSERT_EQ(6llu, mov); + ASSERT_EQ(0llu, cop_ass); + ASSERT_EQ(0llu, mov_ass); } TEST(FixedFunction, freeFunc) diff --git a/tests/thread_pool_options.t.cpp b/tests/thread_pool_options.t.cpp index 574233ee..6c311b42 100644 --- a/tests/thread_pool_options.t.cpp +++ b/tests/thread_pool_options.t.cpp @@ -8,7 +8,7 @@ TEST(ThreadPoolOptions, ctor) { tp::ThreadPoolOptions options; - ASSERT_EQ(1024, options.queueSize()); + ASSERT_EQ(1024llu, options.queueSize()); ASSERT_EQ(std::max(1u, std::thread::hardware_concurrency()), options.threadCount()); } @@ -17,11 +17,11 @@ TEST(ThreadPoolOptions, modification) { tp::ThreadPoolOptions options; - options.setThreadCount(5); - ASSERT_EQ(5, options.threadCount()); + options.setThreadCount(5llu); + ASSERT_EQ(5llu, options.threadCount()); - options.setQueueSize(32); - ASSERT_EQ(32, options.queueSize()); + options.setQueueSize(32llu); + ASSERT_EQ(32llu, options.queueSize()); } int main(int argc, char **argv) {