Skip to content

storage: convert some blocking i/o to non-blocking#3226

Merged
syphar merged 1 commit intorust-lang:mainfrom
syphar:non-blocking
Mar 7, 2026
Merged

storage: convert some blocking i/o to non-blocking#3226
syphar merged 1 commit intorust-lang:mainfrom
syphar:non-blocking

Conversation

@syphar
Copy link
Member

@syphar syphar commented Mar 7, 2026

When working on something else I discovered that there were places where I used blocking i/o functionality inside async functions.

It wasn't too big of an issue, since this is only used on the build-servers, so blocking the tokio runtime threads is not a huge problem, but for other things I'm planning it would be good to fix ( streaming / parallel uploads).

I now validated that all remaining sync i/o is inside spawn_blocking.

For one function (upload a whole local folder) I also now introduced paralellism.

The change to our own spawn_blocking was necessary so we can use it in the same way as the original tokio spawn_blocking ( = use the function to spawn a task, that then start running, and join it later).

@syphar syphar self-assigned this Mar 7, 2026
@syphar syphar requested a review from a team as a code owner March 7, 2026 10:03
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Mar 7, 2026
@syphar syphar marked this pull request as draft March 7, 2026 10:07
@syphar syphar changed the title storage: convert some blocking i/o to non-blocking i/o WIP - storage: convert some blocking i/o to non-blocking i/o Mar 7, 2026
@syphar syphar force-pushed the non-blocking branch 3 times, most recently from 01b9ecb to e256e38 Compare March 7, 2026 10:30
@syphar syphar changed the title WIP - storage: convert some blocking i/o to non-blocking i/o storage: convert some blocking i/o to non-blocking Mar 7, 2026
@syphar syphar marked this pull request as ready for review March 7, 2026 10:31
@syphar syphar requested a review from GuillaumeGomez March 7, 2026 10:31
@syphar
Copy link
Member Author

syphar commented Mar 7, 2026

@GuillaumeGomez tests pass now

@rustbot
Copy link
Collaborator

rustbot commented Mar 7, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@syphar syphar merged commit 3c601d6 into rust-lang:main Mar 7, 2026
11 checks passed
@syphar syphar deleted the non-blocking branch March 7, 2026 14:01
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Mar 7, 2026
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Mar 7, 2026
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