From 1f1eac63694f8d03a9609ee1293fc29839d4204f Mon Sep 17 00:00:00 2001 From: Reinout Meliesie Date: Fri, 2 Jan 2026 21:48:51 +0100 Subject: [PATCH] Remove todo about async multithreading Turns out there is no async code that would benefit from being executed on e.g. a multithreaded Tokio executor. Image loading is already being run on GIO's threadpool, and async-sqlite already has its own thread on which the connection lives. We also cannot easily bypass the latter and do Rusqlite connection IO on a Tokio threadpool because Rusqlite connections are not Send. Overall the current implementation is already pretty optimal given that we're not exactly dealing with thousands of operations per second in this little app. --- src/main.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index ad0dfca..417e095 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,8 +44,6 @@ fn show_window ( application : & Application ) { spawn_future_local ( async move { async_result_context ! ( async { - // TODO: Move non-UI async tasks to non-local context - let data_manager = leak ( DataManager :: new () . await ? ) ; let ui = UI :: new (