pub fn new(poll: &Poll, token: Token, interest: Ready, opt: PollOpt) -> (Registration, SetReadiness) {
        is_send::<Registration>();
        is_sync::<Registration>();
        is_send::<SetReadiness>();
        is_sync::<SetReadiness>();

        // Clone handle to the readiness queue, this bumps the ref count
        let queue = poll.readiness_queue.clone();

        // Allocate the registration node. The new node will have `ref_count`
        // set to 3: one SetReadiness, one Registration, and one Poll handle.
        let node = Box::into_raw(Box::new(ReadinessNode::new(token, interest, opt)));

        let registration = Registration {
            inner: RegistrationInner {
                node: node,
                queue: queue.clone(),
            },
        };

        let set_readiness = SetReadiness {
            inner: RegistrationInner {
                node: node,
                queue: queue.clone(),
            },
        };

        (registration, set_readiness)
    }
/// Create a new `Registration` associated with the given `Poll` instance.
///
/// The returned `Registration` will be associated with this `Poll` for its
/// entire lifetime. Dropping the `Registration` will prevent any further
/// notifications to be polled.
Create a new `Registration` associated with the given `Poll` instance.
The returned `Registration` will be associated with this `Poll` for its
entire lifetime. Dropping the `Registration` will prevent any further
notifications to be polled.
Create a new ` Registration ` associated with the given ` Poll ` instance . The returned ` Registration ` will be associated with this ` Poll ` for its entire lifetime . Dropping the ` Registration ` will prevent any further notifications to be polled .
pub fn new(poll: &Poll, token: Token, interest: Ready, opt: PollOpt) -> (Registration, SetReadiness) {
        is_send::<Registration>();
        is_sync::<Registration>();
        is_send::<SetReadiness>();
        is_sync::<SetReadiness>();
        // Clone handle to the readiness queue, this bumps the ref count
        let queue = poll.readiness_queue.clone();
        // Allocate the registration node. The new node will have `ref_count`
        // set to 3: one SetReadiness, one Registration, and one Poll handle.
        let node = Box::into_raw(Box::new(ReadinessNode::new(token, interest, opt)));
        let registration = Registration {
            inner: RegistrationInner {
                node: node,
                queue: queue.clone(),
            },
        };
        let set_readiness = SetReadiness {
            inner: RegistrationInner {
                node: node,
                queue: queue.clone(),
            },
        };
        (registration, set_readiness)
    }
pub fn new ( poll : & Poll , token : Token , interest : Ready , opt : PollOpt ) -> ( Registration , SetReadiness ) { is_send :: < Registration > ( ) ; is_sync :: < Registration > ( ) ; is_send :: < SetReadiness > ( ) ; is_sync :: < SetReadiness > ( ) ; // Clone handle to the readiness queue, this bumps the ref count let queue = poll . readiness_queue . clone ( ) ; // Allocate the registration node. The new node will have `ref_count` // set to 3: one SetReadiness, one Registration, and one Poll handle. let node = Box :: into_raw ( Box :: new ( ReadinessNode :: new ( token , interest , opt ) ) ) ; let registration = Registration { inner : RegistrationInner { node : node , queue : queue . clone ( ) , } , } ; let set_readiness = SetReadiness { inner : RegistrationInner { node : node , queue : queue . clone ( ) , } , } ; ( registration , set_readiness ) }
Create a new `Registration` associated with the given `Poll` instance.
Create a new ` Registration ` associated with the given ` Poll ` instance .
poll
&Poll
token
Token
interest
Ready
opt
PollOpt