mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-06-18 21:43:37 -04:00
Implement termination of worker threads. To achieve the goal so called control queue has been introduced which is handled in Worker base class. Once worker thread receives stop message it tries to kill itself. It is possible to join a worker thread before deinit know thanks to a semaphore given before thread termination. Some improvements to the interface and implementation has been made including state sanity checks. It is assumed that only service that owns the worker is allowed to stop it, which allows not to consider code reentrancy. Worker destroying procedure has been updated in services that already own workers. Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
7.9 KiB
7.9 KiB