Hello
I've added a progress bar to my
application, so as to show how far along a computationally intense
computation has progressed, but... it doesn't update. In fact, the entire UI stalls. Kind of disappointing, since the whole point of a progress bar is to show the progress of an intense
computation.
I've encountered this before: UI frameworks that keep the UI on the main thread tend to experience this issue. And Python has the whole single-threaded aspect anyway.
Is there a smart, idiomatic approach to this problem? I looked into the multiprocessing module, so as to perform the intense computation on a separate thread, but that's an incredibly complicated piece of work: you can't return a value from a function, but have to use queues pr pipes.
Some details, if needed:
I've verified that the UI
element's `value` field is set by a
`print(self.ids["thought_bar"].value)` immediately after the update.
I've also verified that the progress bar updates when I do something like the example in the showcase; i.e., pulse the timer.
I've also verified that if I start the progress bar with value 0, then it updates to full once the computation is finished some moments later.
It just doesn't update between empty and full, probably because the intense computation hogs the CPU.
john perry