Rework swarm and allow interrupting a dial (#366)

* Rework swarm and allow interrupting a dial
* Improve the UniqueConnec situation
* Remove UniqueConnec::get
* Rename `get_or_dial()` to `dial()` and add `dial_if_empty()`
* Clean the UniqueConnec is the future is dropped
* Rename `set_until` to `tie_or_stop` and add `tie_or_passthrough`
* Add some tests, docs
* Fix memory leak with tasks registration
* Interrupt dialing when a UniqueConnec is dropped or cleared
This commit is contained in:
Pierre Krieger
2018-08-08 12:00:38 +02:00
committed by Benjamin Kampmann
parent e2618dc1b3
commit ea881e3dfa
7 changed files with 907 additions and 254 deletions

View File

@ -227,9 +227,13 @@ extern crate tokio_io;
#[cfg(test)]
extern crate rand;
#[cfg(test)]
extern crate tokio;
#[cfg(test)]
extern crate tokio_codec;
#[cfg(test)]
extern crate tokio_current_thread;
#[cfg(test)]
extern crate tokio_timer;
/// Multi-address re-export.
pub extern crate multiaddr;