aboutsummaryrefslogtreecommitdiffstats
path: root/src/service_runner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix call_on_release: Skip calling `release_func` if resource has been marked ↵Sven Gothel2022-05-131-0/+1
| | | | | | orderly released, avoid use after free. Detected via valgrind.
* Adopt fraction and fraction_timespec, use wait_until() w/ out-of-loop ↵Sven Gothel2022-05-011-10/+10
| | | | | | | | | | absolute timeout_time, avoiding deadlocks Classes affected incl. API change using fraction for relative time - latch - ringbuffer - service_runner - simple_timer
* service_runner: Fix API Doc; 'shall_stop' starts 'true' and shall only be ↵Sven Gothel2022-04-241-8/+20
| | | | false if 'running'; Add and expose mutex and condition_variable for 'shall_stop' change, allowing clients to wait or interrupt by such event (e.g. timer)
* service_runner::stop() shall_stop to be reset in stop() method for claritySven Gothel2022-04-171-1/+1
|
* FunctionDef: Rename Capture{-> Value}InvocationFunc, add ↵Sven Gothel2022-04-171-3/+3
| | | | CaptureRefInvocationFunc; Add function call operator.
* service_runner::join(): Fix DBG_PRINT() argsSven Gothel2022-04-151-1/+1
|
* service_runner: Remove service_end_post_notify (data race leak), add join(), ↵Sven Gothel2022-04-151-43/+90
| | | | | | | | | | | | | | | | | | | | fix using service_shutdown_timeout_ms(), fix API & doc Remove service_end_post_notify (data race leak) - a post lock service_runner callback at EOL may introduce a critical data race memory leak condition, i.e. use after free off-thread. Fix using service_shutdown_timeout_ms() - Have stop() and join() return boolean true only if successful. - A timeout results in return false Add join() - Allow user to wait until service ends, - which helps avoiding pulling resources from running service Fix API & doc - Doc: Clarify relationship of service_shutdown_timeout_ms, stop() and join(). - Simplify getter method-names, remove 'get_'.
* service_runner: Add facility for optional singleton sighandler; start() ↵Sven Gothel2022-01-171-1/+54
| | | | shall only proceed if !running
* Added `jau::service_runner`, a reusable dedicated thread performing custom ↵v0.7.7Sven Gothel2022-01-121-0/+144
user services