-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Workspace APIs "block" tokio threads #11329
Comments
Resolving in favor of #10542. |
stuhood
added a commit
that referenced
this issue
May 31, 2024
Remove `intrinsics` facility from the engine, and instead expose intrinsics in `intrinsics.py` via a new native call response for generators. This solves an issue in #19730 that there were no obvious `@rule` functions to call for intrinsics. The native call response wraps a Rust future, which we trampoline to execute on the Rust runtime, and then return a value to the generator. It should work generically for any use case where we would like `@rule` code to await native code, which opens the door to fixing #11329 by making [`Workspace.write_digest`](https://github.com/pantsbuild/pants/blob/00c757e77f3509dec2849982b148d41d95d6e629/src/python/pants/engine/fs.py#L290-L308) async.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Workspace
andAPIs execute some acrobatics in order to use blocking APIs (waiting for a future to complete) on aInteractiveProcess
tokio
thread (because@rule
s run on atokio
Runtime
). This can cause deadlocks with lower thread counts, and in general is less efficient.(#10291 was a previous tracking issue for this problem)
The text was updated successfully, but these errors were encountered: