From 701b6688dc95fe38aff5cc459fd741b71027cdcb Mon Sep 17 00:00:00 2001 From: Takayama Fumihiko Date: Sun, 15 Oct 2023 22:43:44 +0900 Subject: [PATCH] Update vendor --- .../install/include/pqrs/dispatcher.hpp | 4 ++-- .../include/pqrs/dispatcher/dispatcher.hpp | 2 +- .../pqrs/dispatcher/extra/dispatcher_client.hpp | 2 +- .../pqrs/dispatcher/extra/shared_dispatcher.hpp | 2 +- .../include/pqrs/dispatcher/extra/timer.hpp | 16 ++++++++++++++-- .../include/pqrs/dispatcher/object_id.hpp | 2 +- .../include/pqrs/dispatcher/time_source.hpp | 2 +- .../install/include/pqrs/dispatcher/types.hpp | 2 +- .../install/include/pqrs/dispatcher.hpp | 4 ++-- .../include/pqrs/dispatcher/dispatcher.hpp | 2 +- .../pqrs/dispatcher/extra/dispatcher_client.hpp | 2 +- .../pqrs/dispatcher/extra/shared_dispatcher.hpp | 2 +- .../include/pqrs/dispatcher/extra/timer.hpp | 16 ++++++++++++++-- .../include/pqrs/dispatcher/object_id.hpp | 2 +- .../include/pqrs/dispatcher/time_source.hpp | 2 +- .../install/include/pqrs/dispatcher/types.hpp | 2 +- 16 files changed, 44 insertions(+), 20 deletions(-) diff --git a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher.hpp b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher.hpp index 77efa94..f3c97bc 100644 --- a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher.hpp +++ b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher.hpp @@ -1,10 +1,10 @@ #pragma once -// pqrs::dispatcher v2.11 +// pqrs::dispatcher v2.12 // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) #include "dispatcher/dispatcher.hpp" #include "dispatcher/object_id.hpp" diff --git a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/dispatcher.hpp b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/dispatcher.hpp index b9e037b..7890920 100644 --- a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/dispatcher.hpp +++ b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/dispatcher.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::dispatcher` can be used safely in a multi-threaded environment. diff --git a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/dispatcher_client.hpp b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/dispatcher_client.hpp index 644be36..a012a55 100644 --- a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/dispatcher_client.hpp +++ b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/dispatcher_client.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::extra::dispatcher_client` can be used safely in a multi-threaded environment. diff --git a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/shared_dispatcher.hpp b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/shared_dispatcher.hpp index b30d2a6..0d8c065 100644 --- a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/shared_dispatcher.hpp +++ b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/shared_dispatcher.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::extra::shared_dispatcher` can be used safely in a multi-threaded environment. diff --git a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/timer.hpp b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/timer.hpp index 2c8c969..fcdd79e 100644 --- a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/timer.hpp +++ b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/timer.hpp @@ -2,11 +2,12 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::extra::timer` can be used safely in a multi-threaded environment. #include "dispatcher_client.hpp" +#include namespace pqrs { namespace dispatcher { @@ -23,7 +24,8 @@ class timer final { public: timer(dispatcher_client& dispatcher_client) : dispatcher_client_(dispatcher_client), current_function_id_(0), - interval_(0) { + interval_(0), + enabled_(false) { } ~timer(void) { @@ -35,6 +37,8 @@ class timer final { void start(std::function function, duration interval) { + enabled_ = true; + dispatcher_client_.enqueue_to_dispatcher([this, function, interval] { ++current_function_id_; function_ = function; @@ -45,6 +49,8 @@ class timer final { } void stop(void) { + enabled_ = false; + dispatcher_client_.enqueue_to_dispatcher([this] { ++current_function_id_; function_ = nullptr; @@ -52,6 +58,10 @@ class timer final { }); } + bool enabled(void) const { + return enabled_; + } + private: // This method is executed in the dispatcher thread. void call_function(int function_id) { @@ -80,6 +90,8 @@ class timer final { int current_function_id_; std::function function_; duration interval_; + + std::atomic enabled_; }; } // namespace extra } // namespace dispatcher diff --git a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/object_id.hpp b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/object_id.hpp index 8dfe6cf..b80ac6c 100644 --- a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/object_id.hpp +++ b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/object_id.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::object_id` can be used safely in a multi-threaded environment. diff --git a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/time_source.hpp b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/time_source.hpp index 8b140af..b4ef370 100644 --- a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/time_source.hpp +++ b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/time_source.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::hardware_time_source` can be used safely in a multi-threaded environment. // `pqrs::dispatcher::pseudo_time_source` can be used safely in a multi-threaded environment. diff --git a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/types.hpp b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/types.hpp index a246c1c..0db6bb9 100644 --- a/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/types.hpp +++ b/example/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/types.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) #include diff --git a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher.hpp b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher.hpp index 77efa94..f3c97bc 100644 --- a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher.hpp +++ b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher.hpp @@ -1,10 +1,10 @@ #pragma once -// pqrs::dispatcher v2.11 +// pqrs::dispatcher v2.12 // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) #include "dispatcher/dispatcher.hpp" #include "dispatcher/object_id.hpp" diff --git a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/dispatcher.hpp b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/dispatcher.hpp index b9e037b..7890920 100644 --- a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/dispatcher.hpp +++ b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/dispatcher.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::dispatcher` can be used safely in a multi-threaded environment. diff --git a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/dispatcher_client.hpp b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/dispatcher_client.hpp index 644be36..a012a55 100644 --- a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/dispatcher_client.hpp +++ b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/dispatcher_client.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::extra::dispatcher_client` can be used safely in a multi-threaded environment. diff --git a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/shared_dispatcher.hpp b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/shared_dispatcher.hpp index b30d2a6..0d8c065 100644 --- a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/shared_dispatcher.hpp +++ b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/shared_dispatcher.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::extra::shared_dispatcher` can be used safely in a multi-threaded environment. diff --git a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/timer.hpp b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/timer.hpp index 2c8c969..fcdd79e 100644 --- a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/timer.hpp +++ b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/extra/timer.hpp @@ -2,11 +2,12 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::extra::timer` can be used safely in a multi-threaded environment. #include "dispatcher_client.hpp" +#include namespace pqrs { namespace dispatcher { @@ -23,7 +24,8 @@ class timer final { public: timer(dispatcher_client& dispatcher_client) : dispatcher_client_(dispatcher_client), current_function_id_(0), - interval_(0) { + interval_(0), + enabled_(false) { } ~timer(void) { @@ -35,6 +37,8 @@ class timer final { void start(std::function function, duration interval) { + enabled_ = true; + dispatcher_client_.enqueue_to_dispatcher([this, function, interval] { ++current_function_id_; function_ = function; @@ -45,6 +49,8 @@ class timer final { } void stop(void) { + enabled_ = false; + dispatcher_client_.enqueue_to_dispatcher([this] { ++current_function_id_; function_ = nullptr; @@ -52,6 +58,10 @@ class timer final { }); } + bool enabled(void) const { + return enabled_; + } + private: // This method is executed in the dispatcher thread. void call_function(int function_id) { @@ -80,6 +90,8 @@ class timer final { int current_function_id_; std::function function_; duration interval_; + + std::atomic enabled_; }; } // namespace extra } // namespace dispatcher diff --git a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/object_id.hpp b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/object_id.hpp index 8dfe6cf..b80ac6c 100644 --- a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/object_id.hpp +++ b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/object_id.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::object_id` can be used safely in a multi-threaded environment. diff --git a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/time_source.hpp b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/time_source.hpp index 8b140af..b4ef370 100644 --- a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/time_source.hpp +++ b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/time_source.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) // `pqrs::dispatcher::hardware_time_source` can be used safely in a multi-threaded environment. // `pqrs::dispatcher::pseudo_time_source` can be used safely in a multi-threaded environment. diff --git a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/types.hpp b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/types.hpp index a246c1c..0db6bb9 100644 --- a/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/types.hpp +++ b/tests/vendor/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher/types.hpp @@ -2,7 +2,7 @@ // (C) Copyright Takayama Fumihiko 2018. // Distributed under the Boost Software License, Version 1.0. -// (See http://www.boost.org/LICENSE_1_0.txt) +// (See https://www.boost.org/LICENSE_1_0.txt) #include