From 3158a2c73be4c8145185df4b06578fed3875fe61 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 13 Aug 2016 23:00:27 -0700 Subject: [PATCH] Add a method to get a handle from a pin It's store there anyway! --- src/event_loop.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/event_loop.rs b/src/event_loop.rs index aab1062a3..06ee3a01a 100644 --- a/src/event_loop.rs +++ b/src/event_loop.rs @@ -633,6 +633,11 @@ impl LoopPin { handle: self.handle.clone(), } } + + /// Returns a reference to the underlying handle to the event loop. + pub fn handle(&self) -> &LoopHandle { + &self.handle + } } /// A future which will resolve a unique `tok` token for an I/O object.