Skip to content

Fix issue #500 - #501

Merged
lohedges merged 2 commits into
develfrom
fix_500
Oct 5, 2026
Merged

lohedges merged 2 commits into
develfrom
fix_500

Conversation

@lohedges

@lohedges lohedges commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

This PR closes #500. Each GIL release now belongs to the thread that made it, and threads that don't hold the GIL, or that have already released it, no longer try to.

A second bug surfaced during testing: lazily imported modules could be handed to other threads before they had finished loading, which raised an ImportError. Other threads now wait for the load to complete, as they would for a normal import. Tests are added for both.

  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): [y]
  • I confirm that I have added a changelog entry to the changelog (we will add a link to this PR as part of the review): [y]
  • I confirm that I have permission to release this code under the GPL3 license: [y]

@lohedges lohedges added the bug Something isn't working label Oct 5, 2026
@lohedges
lohedges deployed to sire-build October 5, 2026 11:39 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 5, 2026 11:39 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 5, 2026 11:39 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 5, 2026 11:39 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 5, 2026 11:39 — with GitHub Actions Active
@lohedges
lohedges merged commit 5e2861b into devel Oct 5, 2026
5 checks passed
@lohedges
lohedges deleted the fix_500 branch October 5, 2026 14:01
@chryswoods

Copy link
Copy Markdown
Contributor

Fixed issue 500 - a milestone 🍾

This branch was successfully deployed

1 active deployment
sire-build — 8741ba74 Deployed Oct 5, 2026 by lohedges via build (3.12, linux) #450
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 this pull request may close these issues.

[BUG] Concurrent loading from multiple Python threads can crash

2 participants