From 751a7f49606e9f6d3b033b3c8d83b24f071a5cad Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Mon, 15 Jan 2024 13:09:43 +0100 Subject: [PATCH] fix(core): Start threads later to avoid concurrency issues The only idea I have regarding #1008 is that it might be a concurrency issue caused by low CPU speed (scaling). Delay starting the event and command threads and see if that improves the situation. see #1008 --- bumblebee-status | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bumblebee-status b/bumblebee-status index a16c7472..1f9a3871 100755 --- a/bumblebee-status +++ b/bumblebee-status @@ -108,11 +108,9 @@ def main(): update_lock = threading.Lock() event_thread = threading.Thread(target=handle_events, args=(config, update_lock, )) event_thread.daemon = True - event_thread.start() cmd_thread = threading.Thread(target=handle_commands, args=(config, update_lock, )) cmd_thread.daemon = True - cmd_thread.start() def sig_USR1_handler(signum,stack): if update_lock.acquire(blocking=False) == True: @@ -130,6 +128,9 @@ def main(): if config.reverse(): modules.reverse() + event_thread.start() + cmd_thread.start() + output.modules(modules) if util.format.asbool(config.get("engine.collapsible", True)) == True: