From d3907f0dcac6c6e0d7b3c3abe69c64fe4e9dcaa6 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Tue, 28 Feb 2017 14:21:30 +0200 Subject: PyZMQ restore removed by accident version of Python3/32 bits Change-Id: Ie8a54015a02bdcc5cd0a50faff7b82cf0ad8de93 Signed-off-by: Yaroslav Brustinov --- .../ucs4/32bit/zmq/green/eventloop/ioloop.py | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/green/eventloop/ioloop.py (limited to 'scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/green/eventloop/ioloop.py') diff --git a/scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/green/eventloop/ioloop.py b/scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/green/eventloop/ioloop.py new file mode 100644 index 00000000..e12fd5e9 --- /dev/null +++ b/scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/green/eventloop/ioloop.py @@ -0,0 +1,33 @@ +from zmq.eventloop.ioloop import * +from zmq.green import Poller + +RealIOLoop = IOLoop +RealZMQPoller = ZMQPoller + +class IOLoop(RealIOLoop): + + def initialize(self, impl=None): + impl = _poll() if impl is None else impl + super(IOLoop, self).initialize(impl) + + @staticmethod + def instance(): + """Returns a global `IOLoop` instance. + + Most applications have a single, global `IOLoop` running on the + main thread. Use this method to get this instance from + another thread. To get the current thread's `IOLoop`, use `current()`. + """ + # install this class as the active IOLoop implementation + # when using tornado 3 + if tornado_version >= (3,): + PollIOLoop.configure(IOLoop) + return PollIOLoop.instance() + + +class ZMQPoller(RealZMQPoller): + """gevent-compatible version of ioloop.ZMQPoller""" + def __init__(self): + self._poller = Poller() + +_poll = ZMQPoller -- cgit 1.2.3-korg