Skip to content

Avoid iOS run-loop nesting when the launcher releases the GIL - #847

Merged
freakboy3742 merged 9 commits into
beeware:mainfrom
kattni:codex/846-ios-runloop
Nov 6, 2026
Merged

freakboy3742 merged 9 commits into
beeware:mainfrom
kattni:codex/846-ios-runloop

Conversation

@kattni

@kattni kattni commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Make iOSLifecycle() automatically avoid nesting when the native launcher sets sys._ios_app_main_releases_gil to True. Older launchers retain nesting; explicit overrides remain available. Refs #846.

The complete fix requires this PR and beeware/briefcase-iOS-Xcode-template#91. Either component can be upgraded independently; only updating both disables nesting. Existing Toga and application code work unchanged. Generated native launchers must be updated and rebuilt.

All four old/new Rubicon and launcher combinations passed simulator checks for nesting and prompt worker callbacks, as did a smoke test with unmodified Toga 0.5.7. macOS Python 3.11–3.15, the full iOS suite, docs, pre-commit, and Towncrier checks pass. Physical iPad trackpad validation remains outstanding.

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

Assisted-by: OpenAI Codex

@kattni kattni changed the title Allow iOS apps to avoid the nested run loop Avoid iOS run-loop nesting when the launcher releases the GIL Oct 17, 2026

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As noted on the template, I think this can be significantly simplified if we make the next release 0.6.0, and add a release note in the next Toga release.

@freakboy3742
freakboy3742 merged commit 7f9d972 into beeware:main Nov 6, 2026
23 checks passed
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