pub fn new() -> io::Result<Poll> {
        is_send::<Poll>();
        is_sync::<Poll>();

        let poll = Poll {
            selector: try!(sys::Selector::new()),
            readiness_queue: try!(ReadinessQueue::new()),
            lock_state: AtomicUsize::new(0),
            lock: Mutex::new(()),
            condvar: Condvar::new(),
        };

        // Register the notification wakeup FD with the IO poller
        try!(poll.readiness_queue.inner.awakener.register(&poll, AWAKEN, Ready::readable(), PollOpt::edge()));

        Ok(poll)
    }
/// Return a new `Poll` handle using a default configuration.
Return a new `Poll` handle using a default configuration.
Return a new ` Poll ` handle using a default configuration .
pub fn new() -> io::Result<Poll> {
        is_send::<Poll>();
        is_sync::<Poll>();
        let poll = Poll {
            selector: try!(sys::Selector::new()),
            readiness_queue: try!(ReadinessQueue::new()),
            lock_state: AtomicUsize::new(0),
            lock: Mutex::new(()),
            condvar: Condvar::new(),
        };
        // Register the notification wakeup FD with the IO poller
        try!(poll.readiness_queue.inner.awakener.register(&poll, AWAKEN, Ready::readable(), PollOpt::edge()));
        Ok(poll)
    }
pub fn new ( ) -> io :: Result < Poll > { is_send :: < Poll > ( ) ; is_sync :: < Poll > ( ) ; let poll = Poll { selector : try ! ( sys Selector new ( ) ) , readiness_queue : try ! ( ReadinessQueue new ( ) ) , lock_state : AtomicUsize :: new ( 0 ) , lock : Mutex :: new ( ( ) ) , condvar : Condvar :: new ( ) , } ; // Register the notification wakeup FD with the IO poller try ! ( poll readiness_queue inner awakener register ( poll AWAKEN Ready readable ( ) PollOpt edge ( ) ) ) ; Ok ( poll ) }
Return a new `Poll` handle using a default configuration.
Return a new ` Poll ` handle using a default configuration .