class_docstr: Replacement for :class:`zmq.Poller`
  
  Ensures that the greened Poller below is used in calls to
  :meth:`zmq.Poller.poll`.
docstr: Overridden method to ensure that the green version of
  Poller is used.
  
  Behaves the same as :meth:`zmq.core.Poller.poll`
docstr_tok: ["Overridden","method","to","ensure","that","the","green","version","of","Poller","is","used",".","Behaves","the","same","as",":","meth",":","`","zmq.core.Poller.poll","`"]
code: def poll(self, timeout=-1):
      """Overridden method to ensure that the green version of
      Poller is used.
  
      Behaves the same as :meth:`zmq.core.Poller.poll`
      """
  
      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)
      else:
          tout = None
  
      try:
          # Loop until timeout or events available
          rlist, wlist, xlist = self._get_descriptors()
          while True:
              events = super().poll(0)
              if events or timeout == 0:
                  return events
  
              # wait for activity on sockets in a green way
              # set a minimum poll frequency,
              # because gevent < 1.0 cannot be trusted to catch edge-triggered FD events
              _bug_timeout = gevent.Timeout.start_new(
                  self._gevent_bug_timeout
              )
              try:
                  select.select(rlist, wlist, xlist)
              except gevent.Timeout as t:
                  if t is not _bug_timeout:
                      raise
              finally:
                  _bug_timeout.cancel()
  
      except gevent.Timeout as t:
          if t is not tout:
              raise
          return []
      finally:
          if timeout > 0:
              tout.cancel()
  
imports: import gevent
  from gevent import select
  import zmq
  from zmq import Poller
label_desc: Use image node_id 2 for calling the _Poller obj's underlying member method code with example usage: obj.poll(timeout) and returns: list, events