runtime: fix memory leak/growth when creating many runtimes (#3564)

This commit is contained in:
Ivan Petkov
2021-03-16 19:31:46 +01:00
committed by GitHub
parent e6103d6661
commit e4f76688a0
18 changed files with 437 additions and 285 deletions
@@ -0,0 +1,11 @@
// https://github.com/tokio-rs/tokio/issues/3550
fn main() {
for _ in 0..1000 {
let rt = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap();
drop(rt);
}
}