Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@track UI doesn't remove all coroutines when using parallelize() #147

Closed
falkoschindler opened this issue Jul 15, 2024 · 0 comments · Fixed by #150
Closed

@track UI doesn't remove all coroutines when using parallelize() #147

falkoschindler opened this issue Jul 15, 2024 · 0 comments · Fixed by #150
Labels
bug Something isn't working
Milestone

Comments

@falkoschindler
Copy link
Contributor

falkoschindler commented Jul 15, 2024

The following example shows how shorter coroutines remain in the "track" UI when run with parallelize and the longer coroutine is started later:

from nicegui import ui
import rosys

@rosys.analysis.track
async def short():
    await rosys.sleep(0.25)

@rosys.analysis.track
async def long():
    await rosys.sleep(0.75)

@rosys.analysis.track
async def run() -> None:
    await rosys.automation.parallelize(short(), long())

automator = rosys.automation.Automator(None, default_automation=run)

rosys.automation.automation_controls(automator)
rosys.analysis.track.ui()

ui.run()

After a while the stack accumulates to something like this:

Screenshot 2024-07-15 at 17 13 33

@falkoschindler falkoschindler added the bug Something isn't working label Jul 15, 2024
@falkoschindler falkoschindler changed the title @track UI doesn't remove all coroutines when using parallize() @track UI doesn't remove all coroutines when using parallelize() Jul 15, 2024
@falkoschindler falkoschindler linked a pull request Jul 17, 2024 that will close this issue
@falkoschindler falkoschindler added this to the 0.11.0 milestone Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant