07-28-2023, 08:16 AM
(07-28-2023, 02:01 AM)jacques_duflos Wrote: Hi,
I'm working on a script that takes some time to execute because it sends a list of online requests. It can last up to few minutes. During the process, the window "gimp is not responding" with the options "force to quit" and "wait" appear. Is there a way to prevent it ?
What windows? AFAIK, while a plugin runs, Gimp can still be used...
Otherwise, in general, you cannot have long-delay processing in the same execution thread that handles your GUI. Any process that is expected to take some time (external call, or heavy processing) has to be run asynchronously. It could even be possible to run all you requests in parallel...
In Python this can be done with the threading module but OTOH this isn't really for beginners.
However, having many requests is usually a bad idea, the first thing to check is if you can make fewer requests, even if they are more complex.