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

Update to Kolibri 0.16.0-beta5 #182

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Update to Kolibri 0.16.0-beta5 #182

merged 2 commits into from
Sep 12, 2023

Conversation

dbnicholson
Copy link
Member

Kolibri 0.16.0-beta5 fixes task cancellation, which means that the worker will actually cancel jobs when it's told to stop. With that I think we can revert the change to only stop the worker on destroy. It's conceptually nice to have the buses separate, but there are some drawbacks:

  • onDestroy only happens after onStop completes. That means the worker won't be stopped when until after the server has stopped. That exacerbates the black screen issue on ChromeOS since it's a much wider window where the app can be restarted while it's still being shut down.
  • On Android, onStop is the only hook guaranteed to be run, so if you want the worker to shut down cleanly, it has to be done there.
  • With pythonforandroid, the buses are all being run off the one python thread in the activity, so splitting them just adds more overhead in the process. In the shiny chaquopy future these can be made separate bound services in their own processes.

Helps: endlessm/kolibri-explore-plugin#769

This release fixes cancelling of tasks so that stopping the worker
instance actually stops the running tasks instead of waiting until they
complete.

The patch is no longer needed since it was merged upstream.

Helps: endlessm/kolibri-explore-plugin#769
This reverts commit 4d22c7c. With
kolibri 0.16.0-beta5, tasks can be stopped and there's less reason to
try to split those up. Unlike `onDestroy`, `onStop` is always delivered,
so this gives Kolibri a chance to stop.

In theory it would be better to keep the process buses separate so that
the server and worker run independently. However, that would only really
be a benefit if they could be run in separate bound services. That's not
supported in python-for-android, so for now it's better to run it all
from the single python thread in the activity.
@dylanmccall dylanmccall merged commit defe52c into develop Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants