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

async fn wipe_ostree shouldn't block the thread #778

Closed
omertuc opened this issue Sep 6, 2024 · 0 comments
Closed

async fn wipe_ostree shouldn't block the thread #778

omertuc opened this issue Sep 6, 2024 · 0 comments

Comments

@omertuc
Copy link
Contributor

omertuc commented Sep 6, 2024

An async fn shouldn't block the thread, but write_deployments is a totally blocking heavy filesystem operation. What we do in a few places is do heavy stuff like this inside a tokio::task::spawn_blocking.

Originally posted by @cgwalters in #777 (comment)

omertuc added a commit to omertuc/bootc that referenced this issue Sep 6, 2024
Solves containers#778

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
omertuc added a commit to omertuc/bootc that referenced this issue Sep 6, 2024
Solves containers#778

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
omertuc added a commit to omertuc/bootc that referenced this issue Sep 6, 2024
An async fn shouldn't block the thread, but write_deployments is a
blocking heavy filesystem operation. Using tokio::task::spawn_blocking
to avoid blocking async threads.

Solves containers#778

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
@omertuc omertuc closed this as completed Sep 11, 2024
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

No branches or pull requests

1 participant