fix: 🚑 I couldn't make tokio threads join
This commit is contained in:
parent
ec5c6008f2
commit
82c2fb8883
1 changed files with 2 additions and 2 deletions
|
@ -141,8 +141,8 @@ async fn main() {
|
||||||
let thread = tokio::spawn(prime_async(math_magic * i, math_magic * (i + 1) - 1));
|
let thread = tokio::spawn(prime_async(math_magic * i, math_magic * (i + 1) - 1));
|
||||||
threads.push(thread);
|
threads.push(thread);
|
||||||
}
|
}
|
||||||
for _ in threads {
|
for thread in threads {
|
||||||
tokio::join!();
|
let _ = tokio::join!(thread);
|
||||||
}
|
}
|
||||||
let time_elapsed = instant.elapsed();
|
let time_elapsed = instant.elapsed();
|
||||||
time_values_tokio_thread.push(time_elapsed);
|
time_values_tokio_thread.push(time_elapsed);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue