def poll timeout = :blocking
      unless @items.empty?
        timeout = adjust timeout
        items_triggered = LibXS.xs_poll @items.address, @items.size, timeout
        
        if Util.resultcode_ok?(items_triggered)
          update_selectables
        end
        
        items_triggered
      else
        0
      end
    end
def poll timeout = :blocking
      unless @items.empty?
        timeout = adjust timeout
        items_triggered = LibXS.xs_poll @items.address, @items.size, timeout
        
        if Util.resultcode_ok?(items_triggered)
          update_selectables
        end
        
        items_triggered
      else
        0
      end
    end
Checks each registered socket for selectability based on the poll items'
 registered +events+. Will block for up to +timeout+ milliseconds
 A millisecond is 1/1000 of a second, so to block for 1 second
 pass the value "1000" to #poll.

 Pass "-1" or +:blocking+ for +timeout+ for this call to block
 indefinitely.

 This method will return *immediately* when there are no registered
 sockets. In that case, the +timeout+ parameter is not honored. To
 prevent a CPU busy-loop, the caller of this method should detect
 this possible condition (via #size) and throttle the call
 frequency.

 @param timeout

 @return 0 when there are no readable/writeable registered sockets
 @return number to indicate the number of readable or writable sockets
 @return -1 when there is an error
 When return code -1 use XS::Util.errno to get the related
 error number.