code: def poll(self, timeout=-1):
          
  
          if timeout is None:
              timeout = -1
  
          if timeout < 0:
              timeout = -1
  
          rlist = None
          wlist = None
          xlist = None
  
          if timeout > 0:
              tout = gevent.Timeout.start_new(timeout/1000.0)
  
          try:
              # Loop until timeout or events available
              rlist, wlist, xlist = self._get_descriptors()
              while True:
                  events = super(GreenPoller, self).poll(0)
                  if events or timeout == 0:
                      return events
  
                  # wait for activity on sockets in a green way
                  select.select(rlist, wlist, xlist)
  
          except gevent.Timeout, t:
              if t is not tout:
                  raise
              return []
          finally:
             if timeout > 0:
                 tout.cancel()
docs: Overridden method to ensure that the green version of
          Poller is used.
  
          Behaves the same as :meth:`zmq.core.Poller.poll`