fn schedule(&self, token: usize, dir: Direction) {
        debug!("scheduling direction for: {}", token);
        let io_dispatch = self.io_dispatch.read().unwrap();
        let sched = io_dispatch.get(token).unwrap();

        let (task, ready) = match dir {
            Direction::Read => (&sched.reader, !mio::Ready::writable()),
            Direction::Write => (&sched.writer, mio::Ready::writable()),
        };

        task.register();

        if sched.readiness.load(SeqCst) & ready2usize(ready) != 0 {
            task.notify();
        }
    }
/// Registers interest in the I/O resource associated with `token`.
Registers interest in the I/O resource associated with `token`.
Registers interest in the I / O resource associated with ` token ` .
fn schedule(&self, token: usize, dir: Direction) {
        debug!("scheduling direction for: {}", token);
        let io_dispatch = self.io_dispatch.read().unwrap();
        let sched = io_dispatch.get(token).unwrap();
        let (task, ready) = match dir {
            Direction::Read => (&sched.reader, !mio::Ready::writable()),
            Direction::Write => (&sched.writer, mio::Ready::writable()),
        };
        task.register();
        if sched.readiness.load(SeqCst) & ready2usize(ready) != 0 {
            task.notify();
        }
    }
fn schedule ( & self , token : usize , dir : Direction ) { debug ! ( " " token ) ; let io_dispatch = self . io_dispatch . read ( ) . unwrap ( ) ; let sched = io_dispatch . get ( token ) . unwrap ( ) ; let ( task , ready ) = match dir { Direction :: Read => ( & sched . reader , ! mio :: Ready :: writable ( ) ) , Direction :: Write => ( & sched . writer , mio :: Ready :: writable ( ) ) , } ; task . register ( ) ; if sched . readiness . load ( SeqCst ) & ready2usize ( ready ) != 0 { task . notify ( ) ; } }
Registers interest in the I/O resource associated with `token`.
Registers interest in the I / O resource associated with ` token ` .
&self
token
usize
dir
Direction
&self
token
usize
dir
Direction