summaryrefslogtreecommitdiffstats
path: root/tokio/src/io/driver
diff options
context:
space:
mode:
authorÉmile Grégoire <eg@emilegregoire.ca>2020-07-28 23:43:19 -0400
committerGitHub <noreply@github.com>2020-07-28 20:43:19 -0700
commit646fbae76535e397ef79dbcaacb945d4c829f666 (patch)
tree49c00b3825463cae83eef0e1b65ee3d8266980c3 /tokio/src/io/driver
parent1562bb314482215eb7517e6b8b8bdecbacf10e79 (diff)
rt: fix potential leak during runtime shutdown (#2649)
JoinHandle of threads created by the pool are now tracked and properly joined at shutdown. If the thread does not return within the timeout, then it's not joined and left to the OS for cleanup. Also, break a cycle between wakers held by the timer and the runtime. Fixes #2641, #2535
Diffstat (limited to 'tokio/src/io/driver')
-rw-r--r--tokio/src/io/driver/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tokio/src/io/driver/mod.rs b/tokio/src/io/driver/mod.rs
index dbfb6e16..d8d17f88 100644
--- a/tokio/src/io/driver/mod.rs
+++ b/tokio/src/io/driver/mod.rs
@@ -181,6 +181,8 @@ impl Park for Driver {
self.turn(Some(duration))?;
Ok(())
}
+
+ fn shutdown(&mut self) {}
}
impl fmt::Debug for Driver {