Drop runtime after task completion (#1196)

* Drop runtime after task completion

* Update lighthouse/src/main.rs
This commit is contained in:
Age Manning 2020-05-26 15:34:33 +10:00 committed by GitHub
parent ad4e5adabc
commit f72094ca8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,5 +241,9 @@ fn run<E: EthSpec>(
drop(validator_client); drop(validator_client);
// Shutdown the environment once all tasks have completed. // Shutdown the environment once all tasks have completed.
Ok(environment.shutdown_on_idle()) // Due to a bug in tokio: https://github.com/tokio-rs/tokio/issues/2314
// the `shutdown_on_idle()` will wait until the entire timeout. For the time-being, we shutdown as soon as all
// threads have completed, by dropping the runtime.
//Ok(environment.shutdown_on_idle())
Ok(())
} }