You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It's really no clear at all how to show progress on a bar, while not blocking the app; I am using the App.add_background_task() with a handler and incrementing the value of a ProgressBar as work progresses, but it doesn't show in the UI, until after the handler returns.
This is in a iOS app, and the "blocking" is on IO (so I assume, if I got it right, that asyncio should schedule the UI tasks).
Describe the solution you'd like
It would really be nice to have a clear example, beyond the very basic in the docs, of how to show progress from a background task.
Also an explanation of what the handler is supposed to be doing, and even whether it should return something.
At the moment there is really very little to go on.
Describe alternatives you've considered
I am reverse-engineering the code, looking at the source, and trying in my own code various hacks to try and figure out what is going on.
Additional context
I cannot share the full code, but here is what I arrived at:
def dumb_task(self, ios_app):
for i in range(1, 50, 5):
self.progress.value = i
print(i)
yield 0.1
print("done")
self.progress.value = 100
self.progress.stop()
the value that we yield is the delay in getting called back (I assume it's a "best case" if nothing else is going on?)
Anyways, if someone could describe it (or point me to a place which does) I'd be happy to contribute to the docs.
Thanks!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It's really no clear at all how to show progress on a bar, while not blocking the app; I am using the
App.add_background_task()
with ahandler
and incrementing thevalue
of aProgressBar
as work progresses, but it doesn't show in the UI, until after the handler returns.This is in a iOS app, and the "blocking" is on IO (so I assume, if I got it right, that asyncio should schedule the UI tasks).
Describe the solution you'd like
It would really be nice to have a clear example, beyond the very basic in the docs, of how to show progress from a background task.
Also an explanation of what the
handler
is supposed to be doing, and even whether it should return something.At the moment there is really very little to go on.
Describe alternatives you've considered
I am reverse-engineering the code, looking at the source, and trying in my own code various hacks to try and figure out what is going on.
Additional context
I cannot share the full code, but here is what I arrived at:
the value that we
yield
is thedelay
in getting called back (I assume it's a "best case" if nothing else is going on?)Anyways, if someone could describe it (or point me to a place which does) I'd be happy to contribute to the docs.
Thanks!
The text was updated successfully, but these errors were encountered: