Remove the Remote type

The `Handle` type is now `Send` and `Sync` so the `Remote` type no longer needs
to exist.
This commit is contained in:
Alex Crichton
2017-12-05 08:15:26 -08:00
parent c801584d24
commit 7c768fc046
4 changed files with 20 additions and 113 deletions
+4 -4
View File
@@ -15,7 +15,7 @@ use mio::event::Evented;
use mio::Ready;
use tokio_io::{AsyncRead, AsyncWrite};
use reactor::{Handle, Remote};
use reactor::Handle;
use reactor::io_token::IoToken;
/// A concrete implementation of a stream of readiness notifications for I/O
@@ -103,7 +103,7 @@ impl<E: Evented> PollEvented<E> {
/// method is called, and will likely return an error if this `PollEvented`
/// was created on a separate event loop from the `handle` specified.
pub fn deregister(self, handle: &Handle) -> io::Result<()> {
let inner = match handle.remote.inner.upgrade() {
let inner = match handle.inner.upgrade() {
Some(inner) => inner,
None => return Ok(()),
};
@@ -251,8 +251,8 @@ impl<E> PollEvented<E> {
/// Returns a reference to the event loop handle that this readiness stream
/// is associated with.
pub fn remote(&self) -> &Remote {
self.token.remote()
pub fn handle(&self) -> &Handle {
self.token.handle()
}
/// Returns a shared reference to the underlying I/O object this readiness