From 3c91e76e9eed822966cd5c4d9f00f2c214b2da46 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 10 Apr 2022 19:31:59 +0200 Subject: service_runner: Add API doc --- include/jau/service_runner.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/jau/service_runner.hpp b/include/jau/service_runner.hpp index 5bef63d..3afb472 100644 --- a/include/jau/service_runner.hpp +++ b/include/jau/service_runner.hpp @@ -129,10 +129,27 @@ namespace jau { */ ~service_runner() noexcept; + /** + * Return the given name of this service + */ const std::string& get_name() const noexcept { return name; } + + /** + * Return the thread-id of this service worker thread, zero if not running. + */ pthread_t get_threadid() const noexcept { return thread_id; } + /** + * Returns true if service is running + */ bool is_running() const noexcept { return running; } + + /** + * Returns true if service shall stop. + * + * This flag can be used by the service_work Callback to determine whether to skip lengthly tasks, + * or even to skip stopping this service (again). + */ bool get_shall_stop() const noexcept { return shall_stop; } /** -- cgit v1.2.3