Skip to content

fix(primp-python): resolve parallel client initialization deadlock - #142

Merged
deedy5 merged 2 commits into
mainfrom
dev
Apr 20, 2026
Merged

deedy5 merged 2 commits into
mainfrom
dev

Conversation

@deedy5

@deedy5 deedy5 commented Apr 20, 2026

Copy link
Copy Markdown
Owner

Replace global std LazyLock with PyOnceLock for Tokio runtime initialization that correctly respects Python GIL semantics. Release GIL during client builder execution to prevent deadlock between std OnceLock initialization and background thread GIL acquisition when constructing clients from multiple threads.

Add parallel client construction regression test covering both sync and async client implementations.

deedy5 added 2 commits April 20, 2026 10:35
Replace global std LazyLock with PyOnceLock for Tokio runtime initialization
that correctly respects Python GIL semantics. Release GIL during client builder
execution to prevent deadlock between std OnceLock initialization and background
thread GIL acquisition when constructing clients from multiple threads.

Add parallel client construction regression test covering both sync and async
client implementations.
@deedy5
deedy5 force-pushed the dev branch 3 times, most recently from 24f1ba2 to 8cb92c8 Compare April 20, 2026 07:41
@deedy5
deedy5 merged commit b63c41d into main Apr 20, 2026
55 of 56 checks passed
@deedy5
deedy5 deleted the dev branch April 20, 2026 07:59
@deedy5

deedy5 commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

primp versions 1.2.0, 1.2.1, 1.2.2 with bug parallel client initialization deadlock have been yanked

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.

1 participant