This prevents crashes due to the tasks it spawns continuing to run Backport of a32030d46e6a96547fe4ebe6b1036be652ef659f
@@ -189,6 +189,8 @@ close_framework() {
_event_handler.remove_all_hooks();
+ _task_mgr.cleanup();
+
_is_open = false;
_made_default_pipe = false;
_default_pipe.clear();