Skip to content
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

perf: Replace std::thread spawn with tokio block_in_place #15517

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

nameexhaustion
Copy link
Collaborator

This has the effect of explicitly moving all futures to another thread (if the current thread was polling futures) before blocking on the function using the current thread. It is a no-op if the current thread is not in the tokio runtime.

https://docs.rs/tokio/latest/tokio/task/fn.block_in_place.html

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Apr 7, 2024
@nameexhaustion nameexhaustion marked this pull request as ready for review April 7, 2024 07:53
@nameexhaustion nameexhaustion marked this pull request as draft April 7, 2024 08:42
@nameexhaustion nameexhaustion marked this pull request as ready for review April 7, 2024 08:45
@ritchie46 ritchie46 merged commit 1d4880f into pola-rs:main Apr 7, 2024
18 checks passed
@nameexhaustion nameexhaustion deleted the async branch April 7, 2024 08:58
nameexhaustion added a commit to nameexhaustion/polars that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants