1# -*- coding: utf-8 -*-
2#-----------------------------------------------------------------------------
3#  Copyright (C) 2011-2012 Travis Cline
4#
5#  This file is part of pyzmq
6#  It is adapted from upstream project zeromq_gevent under the New BSD License
7#
8#  Distributed under the terms of the New BSD License.  The full license is in
9#  the file COPYING.BSD, distributed as part of this software.
10#-----------------------------------------------------------------------------
11
12"""zmq.green - gevent compatibility with zeromq.
13
14Usage
15-----
16
17Instead of importing zmq directly, do so in the following manner:
18
19..
20
21    import zmq.green as zmq
22
23
24Any calls that would have blocked the current thread will now only block the
25current green thread.
26
27This compatibility is accomplished by ensuring the nonblocking flag is set
28before any blocking operation and the ØMQ file descriptor is polled internally
29to trigger needed events.
30"""
31
32from zmq import *
33from zmq.green.core import _Context, _Socket
34from zmq.green.poll import _Poller
35Context = _Context
36Socket = _Socket
37Poller = _Poller
38
39from zmq.green.device import device
40
41