Skip to content

Fix http server lock while snapshotting in Mithril Aggregator #246

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

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

jpraynaud
Copy link
Member

@jpraynaud jpraynaud commented Jun 3, 2022

This fixes the http server freeze that was occurring when a blocking function call was made inside a tokio task.

In that case we must enclose the call inside a tokio::task::spawn_blocking.

See https://docs.rs/tokio/latest/tokio/task/fn.spawn_blocking.html for more informations.

Closes #244

This fixes the http server freeze that was occurring when a blocking function call was made inside a tokia task. In that case we must enclose the call inside a 'tokio::task::spawn_blocking'.
See https://docs.rs/tokio/latest/tokio/task/fn.spawn_blocking.html for more informations.
@jpraynaud jpraynaud requested a review from ghubertpalo June 3, 2022 10:04
@ghubertpalo
Copy link
Collaborator

LGTM

@github-actions
Copy link

github-actions bot commented Jun 3, 2022

Unit Test Results

185 tests  ±0   185 ✔️ ±0   2m 22s ⏱️ -12s
  14 suites ±0       0 💤 ±0 
    5 files   ±0       0 ±0 

Results for commit db9f2f8. ± Comparison against base commit 6d05aed.

♻️ This comment has been updated with latest results.

@jpraynaud jpraynaud merged commit 02add70 into main Jun 3, 2022
@jpraynaud jpraynaud deleted the ensemble/244-fix-blocking-code branch June 3, 2022 10:20
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.

Fix http server lock while snapshotting in Mithril Aggregator
2 participants