handle exit and avoid threads hanging (#137)

* barrier on starting network

* handle exit better

* give consensus service its own internal exit signal

* update comment

* remove stop_notifications and fix build
This commit is contained in:
Robert Habermeier
2018-04-18 13:59:46 +02:00
committed by Arkadiy Paronyan
parent e253a4cb9f
commit b6132800b7
8 changed files with 128 additions and 62 deletions
-5
View File
@@ -212,11 +212,6 @@ impl<B, E> Client<B, E> where
self.executor.clone()
}
/// Close notification streams.
pub fn stop_notifications(&self) {
self.import_notification_sinks.lock().clear();
}
/// Get the current set of authorities from storage.
pub fn authorities_at(&self, id: &BlockId) -> error::Result<Vec<AuthorityId>> {
let state = self.state_at(id)?;