Liste des Groupes | Revenir à co vms |
On 10/2/2024 1:44 PM, Simon Clubley wrote:On 2024-10-01, Arne Vajhøj <arne@vajhoej.dk> wrote:>On 10/1/2024 8:46 PM, Lawrence D'Oliveiro wrote:On Tue, 1 Oct 2024 19:46:53 -0400, Arne Vajhøj wrote:>But any time one need to do anything time consuming in the GUI then it>
needs to be done in its own thread ...
Note that ?cpu-intensive? and ?time-consuming? are not synonymous.
Something can take a long time to complete, but not require much CPU time
during that time, so running it in the main thread would be fine and have
minimal impact.
But how do you keep the GUI responsive if the event/main loop
is doing something that is time consuming??
You can add events to the main GTK loop (such as an I/O channel becoming
ready) for GTK to listen on. Not sure if that is what Lawrence is thinking
of.
So the event loop is not executing the long running task, but
it is asking the OS to do something and moves on, and then the
OS stuff an event into the vent loop when whatever is done?
>
Les messages affichés proviennent d'usenet.