diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-23 10:13:41 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-23 10:13:41 +0300 |
commit | e49cc3609a432f44b6cd8d575e6cdb89f599ae93 (patch) | |
tree | 1aafb93d27f73c503274ff026e45f1ad87b7a566 | |
parent | 4b5b636bf056919f59cc1392b75c5b6dff7bc3f2 (diff) | |
download | summain-rs-e49cc3609a432f44b6cd8d575e6cdb89f599ae93.tar.gz |
spawn blocking threads
-rw-r--r-- | src/bin/summain.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/summain.rs b/src/bin/summain.rs index 377a84d..ff48cb5 100644 --- a/src/bin/summain.rs +++ b/src/bin/summain.rs @@ -10,7 +10,7 @@ async fn main() -> anyhow::Result<()> { let mut handles = vec![]; for filename in opt.pathnames.iter().cloned() { - handles.push(tokio::spawn(async move { report(filename) })); + handles.push(tokio::task::spawn_blocking(move || report(filename))); } for h in handles { |