fn poll_future(&mut self, future_id: u64) {
        if let Some(future) = self.futures.get_mut(&future_id) {
            // Create a context to poll this future in
            let glutin_waker        = GlutinFutureWaker { future_id: Mutex::new(Some(future_id)) };
            let glutin_waker        = task::waker(Arc::new(glutin_waker));
            let mut glutin_context  = task::Context::from_waker(&glutin_waker);

            // Poll the future
            let poll_result         = future.poll_unpin(&mut glutin_context);

            // Remove the future from the list if it has completed
            if let task::Poll::Ready(_) = poll_result {
                self.futures.remove(&future_id);
            }
        }
    }
///
/// Causes the future with the specified ID to be polled
///
Causes the future with the specified ID to be polled
Causes the future with the specified ID to be polled
fn poll_future(&mut self, future_id: u64) {
        if let Some(future) = self.futures.get_mut(&future_id) {
            // Create a context to poll this future in
            let glutin_waker        = GlutinFutureWaker { future_id: Mutex::new(Some(future_id)) };
            let glutin_waker        = task::waker(Arc::new(glutin_waker));
            let mut glutin_context  = task::Context::from_waker(&glutin_waker);
            // Poll the future
            let poll_result         = future.poll_unpin(&mut glutin_context);
            // Remove the future from the list if it has completed
            if let task::Poll::Ready(_) = poll_result {
                self.futures.remove(&future_id);
            }
        }
    }
fn poll_future ( & mut self , future_id : u64 ) { if let Some ( future ) = self . futures . get_mut ( & future_id ) { // Create a context to poll this future in let glutin_waker = GlutinFutureWaker { future_id : Mutex :: new ( Some ( future_id ) ) } ; let glutin_waker = task :: waker ( Arc :: new ( glutin_waker ) ) ; let mut glutin_context = task :: Context :: from_waker ( & glutin_waker ) ; // Poll the future let poll_result = future . poll_unpin ( & mut glutin_context ) ; // Remove the future from the list if it has completed if let task :: Poll :: Ready ( _ ) = poll_result { self . futures . remove ( & future_id ) ; } } }
Causes the future with the specified ID to be polled
Causes the future with the specified ID to be polled
&mut self
future_id
u64