-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hello @jwahlstrand, today I saw the release notes of the beta release of Julia version 1.12. One point that might be relevant for Gtk4 (or at least the GUI application @tknopp and I are working on) is the point about the default threads and the new behaviour of the IO task.
The default now seems to be Julia is started with one interactive thread, which is great for Gtk4 and already works. However, the IO task now also runs on this thread.
In our application we have some pretty intensive long-running IO calls and previously those lost around a third of their performance if Gtk4 did not run in an interactive thread, i.e. if Gtk loop and the IO task shared the same thread.
It seems like this setting will be the default/normal behaviour going forwards in 1.12.
A workaround would be if we could either change the task/thread the IO is running on (I asked in the Julia slack if this is possible to do) or if we change the thread the Gtk loop is running on.
The latter case is in theory doable with @tspawnat :interactive 2 from ThreadPools.jl, however there is also the issue of Gtk4 blocking the REPL if more than one thread is present.
Do you have any pointers/ideas what is causing the blocking behaviour for more than one thread? I might be able to dedicate some time to fixing this, I'm just stumped with the loop setup atm