Commit Graph

7 Commits

Author SHA1 Message Date
Austin Horstman
e4ff024fa8 fix(util): bound SafeSignal queue growth under burst load
SafeSignal could queue events forever when worker threads emitted faster than
the main loop could consume, which risks memory growth and stale updates.

I added a queue cap with a drop-oldest policy so growth stays bounded under
burst load, plus a regression test that validates bounded delivery.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-28 22:57:49 -06:00
bilaliscarioth
f91889ce1c format SafeSignal.hpp as the linters want 2025-07-13 14:01:59 +02:00
bilaliscarioth
d808c00324 avoid useless vars on cpu_frequency, mimic sigrtmin/sigrtmax 2025-07-08 02:21:48 +02:00
Alex
f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Aleksei Bavshin
79883dbce4 feat(util): optimize SafeSignal for events from the main thread 2020-12-28 17:31:23 -08:00
Aleksei Bavshin
8a0e76c8d8 fix(util): avoid creating temporary functor for each event 2020-10-19 18:42:25 -07:00
Aleksei Bavshin
285a264aae feat(util): SafeSignal class for cross-thread signals with arguments
Implement a wrapper over Glib::Dispatcher that passes the arguments to
the signal consumer via synchronized `std::queue`.
Arguments are always passed by value and the return type of the signal
is expected to be `void`.
2020-12-28 17:26:55 -08:00