Skip to content

feat: prevent fork with tokio #1396

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ion-elgreco
Copy link

Which issue does this PR close?

Tokio will panic or deadlock if it's forked, so let's check this and give a proper error message.

Signed-off-by: Ion Koutsouris <15728914+ion-elgreco@users.noreply.github.com>
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you for this fix. It's a well-known issue that tokio + pyo3 doesn't work under fork.

Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

LGTM Thanks!

@kevinjqliu
Copy link
Contributor

looks like adding bindings/python to the workspace might have broken some tests in CI

@Xuanwo
Copy link
Member

Xuanwo commented May 31, 2025

It's by design that bindings/python is a separate workspace. Please don't change it.

@ion-elgreco
Copy link
Author

It's by design that bindings/python is a separate workspace. Please don't change it.

Having it separate causes rust analyzer not to work for me in python crate

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.

3 participants