From 78c62a455a5b0584d54c3a8f537e8a61d6d03bc0 Mon Sep 17 00:00:00 2001 From: TSUNG-WEI HUANG Date: Tue, 10 Feb 2026 18:00:25 -0600 Subject: [PATCH] updated test_notifier --- taskflow/core/executor.hpp | 10 ++++++---- taskflow/core/worker.hpp | 1 + taskflow/taskflow.hpp | 2 +- unittests/test_notifiers.cpp | 5 +++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/taskflow/core/executor.hpp b/taskflow/core/executor.hpp index 485ea02a3..90ceede47 100644 --- a/taskflow/core/executor.hpp +++ b/taskflow/core/executor.hpp @@ -1318,9 +1318,12 @@ inline int Executor::this_worker_id() const { inline void Executor::_spawn(size_t N) { for(size_t id=0; id(std::hash()(std::this_thread::get_id()))); @@ -1330,7 +1333,6 @@ inline void Executor::_spawn(size_t N) { _worker_if->scheduler_prologue(w); } - Node* t = nullptr; std::exception_ptr ptr = nullptr; diff --git a/taskflow/core/worker.hpp b/taskflow/core/worker.hpp index 63a24061f..03898baa7 100644 --- a/taskflow/core/worker.hpp +++ b/taskflow/core/worker.hpp @@ -99,6 +99,7 @@ class Worker { //std::default_random_engine _rdgen; BoundedWSQ _wsq; + }; // ---------------------------------------------------------------------------- diff --git a/taskflow/taskflow.hpp b/taskflow/taskflow.hpp index f4e28a1bc..597e7ad13 100644 --- a/taskflow/taskflow.hpp +++ b/taskflow/taskflow.hpp @@ -44,7 +44,7 @@ and a patch number: + TF_VERSION / 100 % 1000 is the minor version + TF_VERSION / 100000 is the major version */ -#define TF_VERSION 400000 +#define TF_VERSION 400100 /** @def TF_MAJOR_VERSION diff --git a/unittests/test_notifiers.cpp b/unittests/test_notifiers.cpp index f00323b74..abb02ef80 100644 --- a/unittests/test_notifiers.cpp +++ b/unittests/test_notifiers.cpp @@ -459,6 +459,7 @@ TEST_CASE("NonblockingNotifier.no_missing_notify_x.15threads" * doctest::timeout TEST_CASE("NonblockingNotifier.no_missing_notify_x.31threads" * doctest::timeout(300)) { no_missing_notify_x(31); } + // ---------------------------------------------------------------------------- // NonblockingNotifier: no_missing_cancel_wait // - Verifies that threads can "change their mind" about sleeping after @@ -640,6 +641,7 @@ TEST_CASE("NonblockingNotifier.no_missing_cancel_wait.2threads"* doctest::timeou TEST_CASE("NonblockingNotifier.no_missing_cancel_wait.4threads"* doctest::timeout(300)){ no_missing_cancel_wait(4); } + TEST_CASE("NonblockingNotifier.no_missing_cancel_wait.5threads"* doctest::timeout(300)){ no_missing_cancel_wait(5); } @@ -945,6 +947,7 @@ void no_missing_notify_ns(size_t N, size_t M = 4, uint32_t seed = 12345) { REQUIRE(notifier.num_waiters() == 0); } + TEST_CASE("NonblockingNotifier.no_missing_notify_ns.1threads"* doctest::timeout(300)){ no_missing_notify_ns(1); } @@ -956,6 +959,7 @@ TEST_CASE("NonblockingNotifier.no_missing_notify_ns.2threads"* doctest::timeout( TEST_CASE("NonblockingNotifier.no_missing_notify_ns.4threads"* doctest::timeout(300)){ no_missing_notify_ns(4); } + TEST_CASE("NonblockingNotifier.no_missing_notify_ns.5threads"* doctest::timeout(300)){ no_missing_notify_ns(5); } @@ -1116,6 +1120,7 @@ TEST_CASE("NonblockingNotifier.no_missing_notify_alls.2threads"* doctest::timeou TEST_CASE("NonblockingNotifier.no_missing_notify_alls.4threads"* doctest::timeout(300)){ no_missing_notify_alls(4); } + TEST_CASE("NonblockingNotifier.no_missing_notify_alls.5threads"* doctest::timeout(300)){ no_missing_notify_alls(5); }