fn poll_and_handle(thread: &mut NetworkThread) -> () {
        let mut events = Events::with_capacity(10);
        thread
            .poll
            .poll(&mut events, Some(Duration::from_millis(100)));
        for event in events.iter() {
            thread.handle_event(event.token(), event.is_readable(), event.is_writable(), 0);
        }
    }
// Cleaner test-cases for manually running the thread
Cleaner test-cases for manually running the thread
Cleaner test - cases for manually running the thread
fn poll_and_handle(thread: &mut NetworkThread) -> () {
        let mut events = Events::with_capacity(10);
        thread
            .poll
            .poll(&mut events, Some(Duration::from_millis(100)));
        for event in events.iter() {
            thread.handle_event(event.token(), event.is_readable(), event.is_writable(), 0);
        }
    }
fn poll_and_handle ( thread : & mut NetworkThread ) -> ( ) { let mut events = Events :: with_capacity ( 10 ) ; thread . poll . poll ( & mut events , Some ( Duration :: from_millis ( 100 ) ) ) ; for event in events . iter ( ) { thread . handle_event ( event . token ( ) , event . is_readable ( ) , event . is_writable ( ) , 0 ) ; } }
Cleaner test-cases for manually running the thread
Cleaner test - cases for manually running the thread
thread
&mut NetworkThread
thread
&mut NetworkThread