def delete sock
      unless (size = @sockets.size).zero?
        @sockets.delete_if { |socket| socket.socket.address == sock.socket.address }
        socket_deleted = size != @sockets.size

        item_deleted = @items.delete sock

        raw_deleted = @raw_to_socket.delete(sock.socket.address)

        socket_deleted && item_deleted && raw_deleted
        
      else
        false
      end
    end
def delete sock
      unless (size = @sockets.size).zero?
        @sockets.delete_if { |socket| socket.socket.address == sock.socket.address }
        socket_deleted = size != @sockets.size

        item_deleted = @items.delete sock

        raw_deleted = @raw_to_socket.delete(sock.socket.address)

        socket_deleted && item_deleted && raw_deleted
        
      else
        false
      end
    end
Deletes the +sock+ for all subscribed events. Called internally
 when a socket has been deregistered and has no more events
 registered anywhere.

 Can also be called directly to remove the socket from the polling
 array.

 @param socket

 @return true if successful
 @return false if not