diff options
author | Sven Gothel <[email protected]> | 2022-04-10 19:31:59 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-04-10 19:31:59 +0200 |
commit | 3c91e76e9eed822966cd5c4d9f00f2c214b2da46 (patch) | |
tree | 479ea056435a1076d0683f1c26f06b0bfc7ab72b /include/jau | |
parent | a41475e3bfc1e04883411d68a6a28729a1e6dff8 (diff) |
service_runner: Add API doc
Diffstat (limited to 'include/jau')
-rw-r--r-- | include/jau/service_runner.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
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; } /** |