Permalink
Browse files

Fixing the units of timeot in select and poll.

  • Loading branch information...
1 parent 18fec65 commit 18f5d061558a176f5496aa8e049182c1a7da64f6 @ellisonbg committed Jul 4, 2010
Showing with 439 additions and 319 deletions.
  1. +415 −316 zmq/_zmq.c
  2. +20 −2 zmq/_zmq.pyx
  3. +4 −1 zmq/eventloop/ioloop.py
View
731 zmq/_zmq.c
@@ -1,11 +1,12 @@
-/* Generated by Cython 0.12 on Mon Jun 7 08:52:56 2010 */
+/* Generated by Cython 0.12.1 on Sat Jul 3 19:00:14 2010 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#else
+
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
@@ -17,6 +18,7 @@
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
#define PyDict_Contains(d,o) PySequence_Contains(d,o)
#endif
+
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
@@ -26,7 +28,9 @@
#define PyInt_AsSsize_t(o) PyInt_AsLong(o)
#define PyNumber_Index(o) PyNumber_Int(o)
#define PyIndex_Check(o) PyNumber_Check(o)
+ #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#endif
+
#if PY_VERSION_HEX < 0x02060000
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
@@ -36,17 +40,17 @@
#define PyType_Modified(t)
typedef struct {
- void *buf;
- PyObject *obj;
- Py_ssize_t len;
- Py_ssize_t itemsize;
- int readonly;
- int ndim;
- char *format;
- Py_ssize_t *shape;
- Py_ssize_t *strides;
- Py_ssize_t *suboffsets;
- void *internal;
+ void *buf;
+ PyObject *obj;
+ Py_ssize_t len;
+ Py_ssize_t itemsize;
+ int readonly;
+ int ndim;
+ char *format;
+ Py_ssize_t *shape;
+ Py_ssize_t *strides;
+ Py_ssize_t *suboffsets;
+ void *internal;
} Py_buffer;
#define PyBUF_SIMPLE 0
@@ -60,18 +64,22 @@
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
#endif
+
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#endif
+
#if PY_MAJOR_VERSION >= 3
#define Py_TPFLAGS_CHECKTYPES 0
#define Py_TPFLAGS_HAVE_INDEX 0
#endif
+
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
+
#if PY_MAJOR_VERSION >= 3
#define PyBaseString_Type PyUnicode_Type
#define PyString_Type PyUnicode_Type
@@ -80,6 +88,7 @@
#define PyBytes_Type PyString_Type
#define PyBytes_CheckExact PyString_CheckExact
#endif
+
#if PY_MAJOR_VERSION >= 3
#define PyInt_Type PyLong_Type
#define PyInt_Check(op) PyLong_Check(op)
@@ -99,10 +108,13 @@
#else
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+
#endif
+
#if PY_MAJOR_VERSION >= 3
#define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
#endif
+
#if !defined(WIN32) && !defined(MS_WINDOWS)
#ifndef __stdcall
#define __stdcall
@@ -116,6 +128,7 @@
#else
#define _USE_MATH_DEFINES
#endif
+
#if PY_VERSION_HEX < 0x02050000
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
@@ -125,6 +138,7 @@
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
#endif
+
#if PY_VERSION_HEX < 0x02050000
#define __Pyx_NAMESTR(n) ((char *)(n))
#define __Pyx_DOCSTR(n) ((char *)(n))
@@ -145,12 +159,14 @@
#include "zmq_compat.h"
#include "zmq.h"
-#ifdef __GNUC__
-#define INLINE __inline__
-#elif _WIN32
-#define INLINE __inline
-#else
-#define INLINE
+#ifndef CYTHON_INLINE
+ #if defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #else
+ #define CYTHON_INLINE
+ #endif
#endif
typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
@@ -172,8 +188,8 @@ typedef struct {PyObject **p; char *s; const long n; const char* encoding; const
#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s))
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
-static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
-static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
#if !defined(T_PYSSIZET)
#if PY_VERSION_HEX < 0x02050000
@@ -237,9 +253,9 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
#endif
#endif
-static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
-static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
@@ -385,19 +401,13 @@ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
-static INLINE PyObject* __Pyx_Type(PyObject* o) {
- PyObject* type = (PyObject*) Py_TYPE(o);
- Py_INCREF(type);
- return type;
-}
-
-static INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
-static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
-static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
PyObject *r;
if (!j) return NULL;
r = PyObject_GetItem(o, j);
@@ -410,7 +420,7 @@ static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
__Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
if (likely(o != Py_None)) {
if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
PyObject *r = PyList_GET_ITEM(o, i);
@@ -430,7 +440,7 @@ static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, in
__Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
if (likely(o != Py_None)) {
if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
PyObject *r = PyTuple_GET_ITEM(o, i);
@@ -451,7 +461,7 @@ static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, i
__Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
PyObject *r;
if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
r = PyList_GET_ITEM(o, i);
@@ -470,7 +480,7 @@ static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fit
return r;
}
-static INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
if (likely(PyList_CheckExact(L))) {
if (PyList_Append(L, x) < 0) return NULL;
Py_INCREF(Py_None);
@@ -486,19 +496,19 @@ static INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
}
}
-static INLINE long __Pyx_NegateNonNeg(long b) { return unlikely(b < 0) ? b : !b; }
-static INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
+static CYTHON_INLINE long __Pyx_NegateNonNeg(long b) { return unlikely(b < 0) ? b : !b; }
+static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
}
-static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-static INLINE void __Pyx_RaiseTooManyValuesError(void);
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void);
static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
static int __Pyx_EndUnpack(PyObject *); /*proto*/
-static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
@@ -513,46 +523,46 @@ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *na
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
#ifndef __PYX_FORCE_INIT_THREADS
-#if PY_VERSION_HEX < 0x02040200
-#define __PYX_FORCE_INIT_THREADS 1
-#else
-#define __PYX_FORCE_INIT_THREADS 0
-#endif
+ #if PY_VERSION_HEX < 0x02040200
+ #define __PYX_FORCE_INIT_THREADS 1
+ #else
+ #define __PYX_FORCE_INIT_THREADS 0
+ #endif
#endif
-static INLINE pyzmq_int64_t __Pyx_PyInt_from_py_pyzmq_int64_t(PyObject *);
+static CYTHON_INLINE pyzmq_int64_t __Pyx_PyInt_from_py_pyzmq_int64_t(PyObject *);
-static INLINE PyObject *__Pyx_PyInt_to_py_pyzmq_int64_t(pyzmq_int64_t);
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_pyzmq_int64_t(pyzmq_int64_t);
-static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
+static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
-static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
+static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
-static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
+static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
-static INLINE char __Pyx_PyInt_AsChar(PyObject *);
+static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
-static INLINE short __Pyx_PyInt_AsShort(PyObject *);
+static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
-static INLINE int __Pyx_PyInt_AsInt(PyObject *);
+static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
-static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
+static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
-static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
+static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
-static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
+static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
-static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
+static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
-static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
-static INLINE long __Pyx_PyInt_AsLong(PyObject *);
+static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
-static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
-static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
+static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
-static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
@@ -570,9 +580,9 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
static PyTypeObject *__pyx_ptype_3zmq_4_zmq_Message = 0;
static PyTypeObject *__pyx_ptype_3zmq_4_zmq_Context = 0;
static PyTypeObject *__pyx_ptype_3zmq_4_zmq_Socket = 0;
-static INLINE void *__pyx_f_3zmq_4_zmq_memnew(size_t); /*proto*/
-static INLINE void __pyx_f_3zmq_4_zmq_memdel(void *); /*proto*/
-static INLINE PyObject *__pyx_f_3zmq_4_zmq_allocate(size_t, void **); /*proto*/
+static CYTHON_INLINE void *__pyx_f_3zmq_4_zmq_memnew(size_t); /*proto*/
+static CYTHON_INLINE void __pyx_f_3zmq_4_zmq_memdel(void *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_3zmq_4_zmq_allocate(size_t, void **); /*proto*/
static void __pyx_f_3zmq_4_zmq_free_python_msg(void *, void *); /*proto*/
#define __Pyx_MODULE_NAME "zmq._zmq"
int __pyx_module_is_main_zmq___zmq = 0;
@@ -874,7 +884,7 @@ static PyObject *__pyx_k_15;
* return malloc(n)
*/
-static INLINE void *__pyx_f_3zmq_4_zmq_memnew(size_t __pyx_v_n) {
+static CYTHON_INLINE void *__pyx_f_3zmq_4_zmq_memnew(size_t __pyx_v_n) {
void *__pyx_r;
int __pyx_t_1;
__Pyx_RefNannySetupContext("memnew");
@@ -917,7 +927,7 @@ static INLINE void *__pyx_f_3zmq_4_zmq_memnew(size_t __pyx_v_n) {
*
*/
-static INLINE void __pyx_f_3zmq_4_zmq_memdel(void *__pyx_v_p) {
+static CYTHON_INLINE void __pyx_f_3zmq_4_zmq_memdel(void *__pyx_v_p) {
int __pyx_t_1;
__Pyx_RefNannySetupContext("memdel");
@@ -946,7 +956,7 @@ static INLINE void __pyx_f_3zmq_4_zmq_memdel(void *__pyx_v_p) {
* cdef void *p = memnew(n)
*/
-static INLINE PyObject *__pyx_f_3zmq_4_zmq_allocate(size_t __pyx_v_n, void **__pyx_v_pp) {
+static CYTHON_INLINE PyObject *__pyx_f_3zmq_4_zmq_allocate(size_t __pyx_v_n, void **__pyx_v_pp) {
PyObject *__pyx_v_cob;
void *__pyx_v_p;
PyObject *__pyx_r = NULL;
@@ -1107,8 +1117,8 @@ static PyObject *__pyx_pf_3zmq_4_zmq_strerror(PyObject *__pyx_self, PyObject *__
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_errnum); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = __Pyx_PyBytes_FromString(zmq_strerror(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_r = __pyx_t_2;
+ __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+ __pyx_r = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
@@ -1224,13 +1234,10 @@ static PyObject *__pyx_pf_3zmq_4_zmq_8ZMQError___init__(PyObject *__pyx_self, Py
* self.errstr = strerror(error)
* self.errno = error
*/
- __pyx_t_2 = ((PyObject *)__Pyx_Type(__pyx_v_error)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_2));
- __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_2), ((PyObject *)((PyObject*)&PyInt_Type)), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_error)), ((PyObject *)((PyObject*)&PyInt_Type)), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_1) {
/* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":246
@@ -1240,17 +1247,17 @@ static PyObject *__pyx_pf_3zmq_4_zmq_8ZMQError___init__(PyObject *__pyx_self, Py
* self.errno = error
* else:
*/
- __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__strerror); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__strerror); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_error);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_error);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_error);
__Pyx_GIVEREF(__pyx_v_error);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__errstr, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -1278,11 +1285,11 @@ static PyObject *__pyx_pf_3zmq_4_zmq_8ZMQError___init__(PyObject *__pyx_self, Py
__Pyx_INCREF(__pyx_v_error);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_error);
__Pyx_GIVEREF(__pyx_v_error);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__errstr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__errstr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":250
* else:
@@ -3651,7 +3658,7 @@ static PyObject *__pyx_pf_3zmq_4_zmq_6Socket_getsockopt(PyObject *__pyx_v_self,
*/
static PyObject *__pyx_pf_3zmq_4_zmq_6Socket_bind(PyObject *__pyx_v_self, PyObject *__pyx_v_addr); /*proto*/
-static char __pyx_doc_3zmq_4_zmq_6Socket_bind[] = "Bind the socket to an address.\n\n This causes the socket to listen on a network port. Sockets on the\n other side of this connection will use :meth:`Sockiet.connect` to\n connect to this socket.\n\n Parameters\n ----------\n addr : str\n The address string. This has the form 'protocol://interface:port',\n for example 'tcp://127.0.0.1:5555'. Protocols supported are\n tcp, upd, pgm, iproc and ipc.\n ";
+static char __pyx_doc_3zmq_4_zmq_6Socket_bind[] = "Bind the socket to an address.\n\n This causes the socket to listen on a network port. Sockets on the\n other side of this connection will use :meth:`Sockiet.connect` to\n connect to this socket.\n\n Parameters\n ----------\n addr : str\n The address string. This has the form 'protocol://interface:port',\n for example 'tcp://127.0.0.1:5555'. Protocols supported are\n tcp, upd, pgm, inproc and ipc.\n ";
static PyObject *__pyx_pf_3zmq_4_zmq_6Socket_bind(PyObject *__pyx_v_self, PyObject *__pyx_v_addr) {
int __pyx_v_rc;
PyObject *__pyx_r = NULL;
@@ -4092,7 +4099,7 @@ static PyObject *__pyx_pf_3zmq_4_zmq_6Socket_bind_to_random_port(PyObject *__pyx
*/
static PyObject *__pyx_pf_3zmq_4_zmq_6Socket_connect(PyObject *__pyx_v_self, PyObject *__pyx_v_addr); /*proto*/
-static char __pyx_doc_3zmq_4_zmq_6Socket_connect[] = "Connect to a remote 0MQ socket.\n\n Parameters\n ----------\n addr : str\n The address string. This has the form 'protocol://interface:port',\n for example 'tcp://127.0.0.1:5555'. Protocols supported are\n tcp, upd, pgm, iproc and ipc.\n ";
+static char __pyx_doc_3zmq_4_zmq_6Socket_connect[] = "Connect to a remote 0MQ socket.\n\n Parameters\n ----------\n addr : str\n The address string. This has the form 'protocol://interface:port',\n for example 'tcp://127.0.0.1:5555'. Protocols supported are\n tcp, upd, pgm, inproc and ipc.\n ";
static PyObject *__pyx_pf_3zmq_4_zmq_6Socket_connect(PyObject *__pyx_v_self, PyObject *__pyx_v_addr) {
int __pyx_v_rc;
PyObject *__pyx_r = NULL;
@@ -7917,7 +7924,7 @@ static PyObject *__pyx_pf_3zmq_4_zmq_6Poller_unregister(PyObject *__pyx_self, Py
*/
static PyObject *__pyx_pf_3zmq_4_zmq_6Poller_poll(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_3zmq_4_zmq_6Poller_poll[] = "Poll the registered 0MQ or native fds for I/O.\n\n Parameters\n ----------\n timeout : int\n The timeout in microseconds. If None, no timeout (infinite).\n ";
+static char __pyx_doc_3zmq_4_zmq_6Poller_poll[] = "Poll the registered 0MQ or native fds for I/O.\n\n Parameters\n ----------\n timeout : float, int\n The timeout in milliseconds. If None, no timeout (infinite). This\n is in milliseconds to be compatible with :func:`select.poll`. The\n underlying zmq_poll uses microseconds and we convert to that in\n this function.\n ";
static PyMethodDef __pyx_mdef_3zmq_4_zmq_6Poller_poll = {__Pyx_NAMESTR("poll"), (PyCFunction)__pyx_pf_3zmq_4_zmq_6Poller_poll, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_3zmq_4_zmq_6Poller_poll)};
static PyObject *__pyx_pf_3zmq_4_zmq_6Poller_poll(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
@@ -7976,22 +7983,22 @@ static PyObject *__pyx_pf_3zmq_4_zmq_6Poller_poll(PyObject *__pyx_self, PyObject
__Pyx_INCREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_timeout);
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1052
- * The timeout in microseconds. If None, no timeout (infinite).
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1055
+ * this function.
* """
* if timeout is None: # <<<<<<<<<<<<<<
* timeout = -1
- * return _poll(self.sockets.items(), timeout=timeout)
+ * # Convert from ms -> us for zmq_poll.
*/
__pyx_t_1 = (__pyx_v_timeout == Py_None);
if (__pyx_t_1) {
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1053
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1056
* """
* if timeout is None:
* timeout = -1 # <<<<<<<<<<<<<<
- * return _poll(self.sockets.items(), timeout=timeout)
- *
+ * # Convert from ms -> us for zmq_poll.
+ * timeout = int(timeout*1000.0)
*/
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_DECREF(__pyx_v_timeout);
@@ -8000,37 +8007,88 @@ static PyObject *__pyx_pf_3zmq_4_zmq_6Poller_poll(PyObject *__pyx_self, PyObject
}
__pyx_L6:;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1054
- * if timeout is None:
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1058
+ * timeout = -1
+ * # Convert from ms -> us for zmq_poll.
+ * timeout = int(timeout*1000.0) # <<<<<<<<<<<<<<
+ * if timeout < 0:
+ * timeout = -1
+ */
+ __pyx_t_2 = PyFloat_FromDouble(1000.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_timeout, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_v_timeout);
+ __pyx_v_timeout = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1059
+ * # Convert from ms -> us for zmq_poll.
+ * timeout = int(timeout*1000.0)
+ * if timeout < 0: # <<<<<<<<<<<<<<
+ * timeout = -1
+ * return _poll(self.sockets.items(), timeout=timeout)
+ */
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_timeout, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1060
+ * timeout = int(timeout*1000.0)
+ * if timeout < 0:
+ * timeout = -1 # <<<<<<<<<<<<<<
+ * return _poll(self.sockets.items(), timeout=timeout)
+ *
+ */
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_DECREF(__pyx_v_timeout);
+ __pyx_v_timeout = __pyx_int_neg_1;
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1061
+ * if timeout < 0:
* timeout = -1
* return _poll(self.sockets.items(), timeout=timeout) # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___poll); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__sockets); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___poll); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__items); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__sockets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__items); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_3);
- __pyx_t_3 = 0;
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_3));
- if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__timeout), __pyx_v_timeout) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+ if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__timeout), __pyx_v_timeout) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
@@ -8052,7 +8110,7 @@ static PyObject *__pyx_pf_3zmq_4_zmq_6Poller_poll(PyObject *__pyx_self, PyObject
return __pyx_r;
}
-/* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1057
+/* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1064
*
*
* def select(rlist, wlist, xlist, timeout=None): # <<<<<<<<<<<<<<
@@ -8061,7 +8119,7 @@ static PyObject *__pyx_pf_3zmq_4_zmq_6Poller_poll(PyObject *__pyx_self, PyObject
*/
static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_3zmq_4_zmq_select[] = "Return the result of poll as a lists of sockets ready for r/w.\n\n This has the same interface as Python's built-in :func:`select` function.\n ";
+static char __pyx_doc_3zmq_4_zmq_select[] = "Return the result of poll as a lists of sockets ready for r/w.\n\n This has the same interface as Python's built-in :func:`select` function.\n\n Parameters\n ----------\n timeout : float, int\n The timeout in seconds. This is in seconds to be compatible with\n :func:`select.select`. The underlying zmq_poll uses microseconds and\n we convert to that in this function.\n ";
static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_rlist = 0;
PyObject *__pyx_v_wlist = 0;
@@ -8074,8 +8132,8 @@ static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__py
PyObject *__pyx_r = NULL;
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
- Py_ssize_t __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
@@ -8103,13 +8161,13 @@ static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__py
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__wlist);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("select", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("select", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xlist);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("select", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("select", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (kw_args > 0) {
@@ -8118,7 +8176,7 @@ static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__py
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "select") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "select") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_rlist = values[0];
__pyx_v_wlist = values[1];
@@ -8139,7 +8197,7 @@ static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__py
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("select", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("select", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("zmq._zmq.select");
return NULL;
@@ -8153,22 +8211,22 @@ static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__py
__pyx_v_flags = Py_None; __Pyx_INCREF(Py_None);
__pyx_v_return_sockets = Py_None; __Pyx_INCREF(Py_None);
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1062
- * This has the same interface as Python's built-in :func:`select` function.
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1076
+ * we convert to that in this function.
* """
* if timeout is None: # <<<<<<<<<<<<<<
* timeout = -1
- * sockets = []
+ * # Convert from sec -> us for zmq_poll.
*/
__pyx_t_1 = (__pyx_v_timeout == Py_None);
if (__pyx_t_1) {
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1063
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1077
* """
* if timeout is None:
* timeout = -1 # <<<<<<<<<<<<<<
- * sockets = []
- * for s in set(rlist + wlist + xlist):
+ * # Convert from sec -> us for zmq_poll.
+ * timeout = int(timeout*1000000.0)
*/
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_DECREF(__pyx_v_timeout);
@@ -8177,66 +8235,107 @@ static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__py
}
__pyx_L6:;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1064
- * if timeout is None:
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1079
+ * timeout = -1
+ * # Convert from sec -> us for zmq_poll.
+ * timeout = int(timeout*1000000.0) # <<<<<<<<<<<<<<
+ * if timeout < 0:
+ * timeout = -1
+ */
+ __pyx_t_2 = PyFloat_FromDouble(1000000.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_timeout, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_v_timeout);
+ __pyx_v_timeout = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1080
+ * # Convert from sec -> us for zmq_poll.
+ * timeout = int(timeout*1000000.0)
+ * if timeout < 0: # <<<<<<<<<<<<<<
+ * timeout = -1
+ * sockets = []
+ */
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_timeout, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1081
+ * timeout = int(timeout*1000000.0)
+ * if timeout < 0:
+ * timeout = -1 # <<<<<<<<<<<<<<
+ * sockets = []
+ * for s in set(rlist + wlist + xlist):
+ */
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_DECREF(__pyx_v_timeout);
+ __pyx_v_timeout = __pyx_int_neg_1;
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1082
+ * if timeout < 0:
* timeout = -1
* sockets = [] # <<<<<<<<<<<<<<
* for s in set(rlist + wlist + xlist):
* flags = 0
*/
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
__Pyx_DECREF(__pyx_v_sockets);
- __pyx_v_sockets = ((PyObject *)__pyx_t_2);
- __pyx_t_2 = 0;
+ __pyx_v_sockets = ((PyObject *)__pyx_t_3);
+ __pyx_t_3 = 0;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1065
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1083
* timeout = -1
* sockets = []
* for s in set(rlist + wlist + xlist): # <<<<<<<<<<<<<<
* flags = 0
* if s in rlist:
*/
- __pyx_t_2 = PyNumber_Add(__pyx_v_rlist, __pyx_v_wlist); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Add(__pyx_v_rlist, __pyx_v_wlist); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_xlist); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_v_xlist); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PySet_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PySet_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
- __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2);
- } else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
for (;;) {
- if (likely(PyList_CheckExact(__pyx_t_2))) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
- } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
- } else {
- __pyx_t_4 = PyIter_Next(__pyx_t_2);
- if (!__pyx_t_4) {
- if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {
+ __pyx_t_2 = PyIter_Next(__pyx_t_3);
+ if (!__pyx_t_2) {
+ if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
break;
}
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_2);
}
__Pyx_DECREF(__pyx_v_s);
- __pyx_v_s = __pyx_t_4;
- __pyx_t_4 = 0;
+ __pyx_v_s = __pyx_t_2;
+ __pyx_t_2 = 0;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1066
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1084
* sockets = []
* for s in set(rlist + wlist + xlist):
* flags = 0 # <<<<<<<<<<<<<<
@@ -8247,211 +8346,211 @@ static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__py
__Pyx_DECREF(__pyx_v_flags);
__pyx_v_flags = __pyx_int_0;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1067
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1085
* for s in set(rlist + wlist + xlist):
* flags = 0
* if s in rlist: # <<<<<<<<<<<<<<
* flags |= POLLIN
* if s in wlist:
*/
- __pyx_t_1 = ((PySequence_Contains(__pyx_v_rlist, __pyx_v_s))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PySequence_Contains(__pyx_v_rlist, __pyx_v_s))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1068
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1086
* flags = 0
* if s in rlist:
* flags |= POLLIN # <<<<<<<<<<<<<<
* if s in wlist:
* flags |= POLLOUT
*/
- __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLIN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLIN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_flags);
__pyx_v_flags = __pyx_t_5;
__pyx_t_5 = 0;
- goto __pyx_L9;
+ goto __pyx_L10;
}
- __pyx_L9:;
+ __pyx_L10:;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1069
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1087
* if s in rlist:
* flags |= POLLIN
* if s in wlist: # <<<<<<<<<<<<<<
* flags |= POLLOUT
* if s in xlist:
*/
- __pyx_t_1 = ((PySequence_Contains(__pyx_v_wlist, __pyx_v_s))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PySequence_Contains(__pyx_v_wlist, __pyx_v_s))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1070
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1088
* flags |= POLLIN
* if s in wlist:
* flags |= POLLOUT # <<<<<<<<<<<<<<
* if s in xlist:
* flags |= POLLERR
*/
- __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLOUT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLOUT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_v_flags);
- __pyx_v_flags = __pyx_t_4;
- __pyx_t_4 = 0;
- goto __pyx_L10;
+ __pyx_v_flags = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L11;
}
- __pyx_L10:;
+ __pyx_L11:;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1071
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1089
* if s in wlist:
* flags |= POLLOUT
* if s in xlist: # <<<<<<<<<<<<<<
* flags |= POLLERR
* sockets.append((s, flags))
*/
- __pyx_t_1 = ((PySequence_Contains(__pyx_v_xlist, __pyx_v_s))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PySequence_Contains(__pyx_v_xlist, __pyx_v_s))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1072
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1090
* flags |= POLLOUT
* if s in xlist:
* flags |= POLLERR # <<<<<<<<<<<<<<
* sockets.append((s, flags))
* return_sockets = _poll(sockets, timeout)
*/
- __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLERR); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLERR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_flags);
__pyx_v_flags = __pyx_t_5;
__pyx_t_5 = 0;
- goto __pyx_L11;
+ goto __pyx_L12;
}
- __pyx_L11:;
+ __pyx_L12:;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1073
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1091
* if s in xlist:
* flags |= POLLERR
* sockets.append((s, flags)) # <<<<<<<<<<<<<<
* return_sockets = _poll(sockets, timeout)
* rlist, wlist, xlist = [], [], []
*/
- __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_s);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s);
__Pyx_GIVEREF(__pyx_v_s);
__Pyx_INCREF(__pyx_v_flags);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_flags);
__Pyx_GIVEREF(__pyx_v_flags);
- __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_sockets, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_sockets, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1074
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1092
* flags |= POLLERR
* sockets.append((s, flags))
* return_sockets = _poll(sockets, timeout) # <<<<<<<<<<<<<<
* rlist, wlist, xlist = [], [], []
* for s, flags in return_sockets:
*/
- __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___poll); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___poll); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_sockets);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sockets);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sockets);
__Pyx_GIVEREF(__pyx_v_sockets);
__Pyx_INCREF(__pyx_v_timeout);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_timeout);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_timeout);
__Pyx_GIVEREF(__pyx_v_timeout);
- __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_v_return_sockets);
__pyx_v_return_sockets = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1075
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1093
* sockets.append((s, flags))
* return_sockets = _poll(sockets, timeout)
* rlist, wlist, xlist = [], [], [] # <<<<<<<<<<<<<<
* for s, flags in return_sockets:
* if flags & POLLIN:
*/
- __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_4));
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
__Pyx_DECREF(__pyx_v_rlist);
__pyx_v_rlist = ((PyObject *)__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_DECREF(__pyx_v_wlist);
- __pyx_v_wlist = ((PyObject *)__pyx_t_4);
- __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_v_xlist);
- __pyx_v_xlist = ((PyObject *)__pyx_t_2);
+ __pyx_v_wlist = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_v_xlist);
+ __pyx_v_xlist = ((PyObject *)__pyx_t_3);
+ __pyx_t_3 = 0;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1076
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1094
* return_sockets = _poll(sockets, timeout)
* rlist, wlist, xlist = [], [], []
* for s, flags in return_sockets: # <<<<<<<<<<<<<<
* if flags & POLLIN:
* rlist.append(s)
*/
if (PyList_CheckExact(__pyx_v_return_sockets) || PyTuple_CheckExact(__pyx_v_return_sockets)) {
- __pyx_t_3 = 0; __pyx_t_2 = __pyx_v_return_sockets; __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_4 = 0; __pyx_t_3 = __pyx_v_return_sockets; __Pyx_INCREF(__pyx_t_3);
} else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_return_sockets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_return_sockets); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
}
for (;;) {
- if (likely(PyList_CheckExact(__pyx_t_2))) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
- } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
+ } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
} else {
- __pyx_t_4 = PyIter_Next(__pyx_t_2);
- if (!__pyx_t_4) {
- if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyIter_Next(__pyx_t_3);
+ if (!__pyx_t_2) {
+ if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
break;
}
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_2);
}
- if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
- PyObject* tuple = __pyx_t_4;
+ if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
+ PyObject* tuple = __pyx_t_2;
__pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
__pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_s);
__pyx_v_s = __pyx_t_5;
__pyx_t_5 = 0;
__Pyx_DECREF(__pyx_v_flags);
__pyx_v_flags = __pyx_t_6;
__pyx_t_6 = 0;
} else {
- __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_v_s);
__pyx_v_s = __pyx_t_5;
@@ -8461,126 +8560,126 @@ static PyObject *__pyx_pf_3zmq_4_zmq_select(PyObject *__pyx_self, PyObject *__py
__pyx_t_6 = 0;
}
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1077
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1095
* rlist, wlist, xlist = [], [], []
* for s, flags in return_sockets:
* if flags & POLLIN: # <<<<<<<<<<<<<<
* rlist.append(s)
* if flags & POLLOUT:
*/
- __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLIN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyNumber_And(__pyx_v_flags, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLIN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyNumber_And(__pyx_v_flags, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_1) {
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1078
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1096
* for s, flags in return_sockets:
* if flags & POLLIN:
* rlist.append(s) # <<<<<<<<<<<<<<
* if flags & POLLOUT:
* wlist.append(s)
*/
- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_rlist, __pyx_v_s); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_rlist, __pyx_v_s); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- goto __pyx_L14;
+ goto __pyx_L15;
}
- __pyx_L14:;
+ __pyx_L15:;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1079
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1097
* if flags & POLLIN:
* rlist.append(s)
* if flags & POLLOUT: # <<<<<<<<<<<<<<
* wlist.append(s)
* if flags & POLLERR:
*/
- __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLOUT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLOUT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyNumber_And(__pyx_v_flags, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = PyNumber_And(__pyx_v_flags, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_1) {
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1080
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1098
* rlist.append(s)
* if flags & POLLOUT:
* wlist.append(s) # <<<<<<<<<<<<<<
* if flags & POLLERR:
* xlist.append(s)
*/
- __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_wlist, __pyx_v_s); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- goto __pyx_L15;
+ __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_wlist, __pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L16;
}
- __pyx_L15:;
+ __pyx_L16:;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1081
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1099
* if flags & POLLOUT:
* wlist.append(s)
* if flags & POLLERR: # <<<<<<<<<<<<<<
* xlist.append(s)
* return rlist, wlist, xlist
*/
- __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLERR); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyNumber_And(__pyx_v_flags, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__POLLERR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyNumber_And(__pyx_v_flags, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_1) {
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1082
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1100
* wlist.append(s)
* if flags & POLLERR:
* xlist.append(s) # <<<<<<<<<<<<<<
* return rlist, wlist, xlist
*
*/
- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_xlist, __pyx_v_s); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_xlist, __pyx_v_s); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- goto __pyx_L16;
+ goto __pyx_L17;
}
- __pyx_L16:;
+ __pyx_L17:;
}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1083
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1101
* if flags & POLLERR:
* xlist.append(s)
* return rlist, wlist, xlist # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_rlist);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_rlist);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_rlist);
__Pyx_GIVEREF(__pyx_v_rlist);
__Pyx_INCREF(__pyx_v_wlist);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_wlist);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_wlist);
__Pyx_GIVEREF(__pyx_v_wlist);
__Pyx_INCREF(__pyx_v_xlist);
- PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_xlist);
+ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_xlist);
__Pyx_GIVEREF(__pyx_v_xlist);
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
goto __pyx_L0;
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
@@ -10452,14 +10551,14 @@ PyMODINIT_FUNC PyInit__zmq(void)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1087
+ /* "/Users/bgranger/Documents/Computation/zeromq/pyzmq/zmq/_zmq.pyx":1105
*
*
* __all__ = [ # <<<<<<<<<<<<<<
* 'Message',
* 'Context',
*/
- __pyx_t_4 = PyList_New(49); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_New(49); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_INCREF(((PyObject *)__pyx_n_s__Message));
PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__Message));
@@ -10608,10 +10707,10 @@ PyMODINIT_FUNC PyInit__zmq(void)
__Pyx_INCREF(((PyObject *)__pyx_n_s__ETERM));
PyList_SET_ITEM(__pyx_t_4, 48, ((PyObject *)__pyx_n_s__ETERM));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__ETERM));
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- /* "/Library/Frameworks/Python.framework/Versions/6.0.1/lib/python2.6/site-packages/Cython/Includes/stdlib.pxd":2
+ /* "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/Cython/Includes/stdlib.pxd":2
*
* cdef extern from "stdlib.h" nogil: # <<<<<<<<<<<<<<
* void free(void *ptr)
@@ -10819,7 +10918,7 @@ static int __Pyx_ParseOptionalKeywords(
return -1;
}
-static INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
if (unlikely(!type)) {
PyErr_Format(PyExc_SystemError, "Missing type object");
return 0;
@@ -10831,7 +10930,7 @@ static INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
return 0;
}
-static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
PyObject *tmp_type, *tmp_value, *tmp_tb;
PyThreadState *tstate = PyThreadState_GET();
@@ -10846,7 +10945,7 @@ static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *t
Py_XDECREF(tmp_tb);
}
-static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
PyThreadState *tstate = PyThreadState_GET();
*type = tstate->curexc_type;
*value = tstate->curexc_value;
@@ -10859,7 +10958,7 @@ static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **
-static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
PyErr_Format(PyExc_ValueError,
#if PY_VERSION_HEX < 0x02050000
"need more than %d value%s to unpack", (int)index,
@@ -10869,7 +10968,7 @@ static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
(index == 1) ? "" : "s");
}
-static INLINE void __Pyx_RaiseTooManyValuesError(void) {
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void) {
PyErr_SetString(PyExc_ValueError, "too many values to unpack");
}
@@ -10896,7 +10995,7 @@ static int __Pyx_EndUnpack(PyObject *iter) {
return -1;
}
-static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
PyThreadState *tstate = PyThreadState_GET();
*type = tstate->exc_type;
*value = tstate->exc_value;
@@ -11116,7 +11215,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
}
#endif
-static INLINE pyzmq_int64_t __Pyx_PyInt_from_py_pyzmq_int64_t(PyObject* x) {
+static CYTHON_INLINE pyzmq_int64_t __Pyx_PyInt_from_py_pyzmq_int64_t(PyObject* x) {
const pyzmq_int64_t neg_one = (pyzmq_int64_t)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(pyzmq_int64_t) == sizeof(char)) {
@@ -11157,7 +11256,7 @@ static INLINE pyzmq_int64_t __Pyx_PyInt_from_py_pyzmq_int64_t(PyObject* x) {
return (pyzmq_int64_t)-1;
}
-static INLINE PyObject *__Pyx_PyInt_to_py_pyzmq_int64_t(pyzmq_int64_t val) {
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_pyzmq_int64_t(pyzmq_int64_t val) {
const pyzmq_int64_t neg_one = (pyzmq_int64_t)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(pyzmq_int64_t) < sizeof(long)) {
@@ -11175,7 +11274,7 @@ static INLINE PyObject *__Pyx_PyInt_to_py_pyzmq_int64_t(pyzmq_int64_t val) {
}
}
-static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
+static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(unsigned char) < sizeof(long)) {
@@ -11194,7 +11293,7 @@ static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}
-static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
+static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(unsigned short) < sizeof(long)) {
@@ -11213,7 +11312,7 @@ static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}
-static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
+static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(unsigned int) < sizeof(long)) {
@@ -11232,7 +11331,7 @@ static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
return (unsigned
}
-static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
+static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
const char neg_one = (char)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(char) < sizeof(long)) {
@@ -11251,7 +11350,7 @@ static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
return (char)__Pyx_PyInt_AsLong(x);
}
-static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
+static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
const short neg_one = (short)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(short) < sizeof(long)) {
@@ -11270,7 +11369,7 @@ static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
return (short)__Pyx_PyInt_AsLong(x);
}
-static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
+static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
const int neg_one = (int)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(int) < sizeof(long)) {
@@ -11289,7 +11388,7 @@ static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
return (int)__Pyx_PyInt_AsLong(x);
}
-static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
+static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
const signed char neg_one = (signed char)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(signed char) < sizeof(long)) {
@@ -11308,7 +11407,7 @@ static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
return (signed char)__Pyx_PyInt_AsSignedLong(x);
}
-static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
+static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
const signed short neg_one = (signed short)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(signed short) < sizeof(long)) {
@@ -11327,7 +11426,7 @@ static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
return (signed short)__Pyx_PyInt_AsSignedLong(x);
}
-static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
+static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
const signed int neg_one = (signed int)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
if (sizeof(signed int) < sizeof(long)) {
@@ -11346,7 +11445,7 @@ static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
return (signed int)__Pyx_PyInt_AsSignedLong(x);
}
-static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
+static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
@@ -11381,7 +11480,7 @@ static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
}
}
-static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
@@ -11416,7 +11515,7 @@ static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x)
}
}
-static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
+static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
const long neg_one = (long)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
@@ -11451,7 +11550,7 @@ static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
}
}
-static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
@@ -11486,7 +11585,7 @@ static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
}
}
-static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
+static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
const signed long neg_one = (signed long)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
@@ -11521,7 +11620,7 @@ static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
}
}
-static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
@@ -11675,13 +11774,13 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
/* Type Conversion Functions */
-static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
if (x == Py_True) return 1;
else if ((x == Py_False) | (x == Py_None)) return 0;
else return PyObject_IsTrue(x);
}
-static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
PyNumberMethods *m;
const char *name = NULL;
PyObject *res = NULL;
@@ -11727,7 +11826,7 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
return res;
}
-static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
Py_ssize_t ival;
PyObject* x = PyNumber_Index(b);
if (!x) return -1;
@@ -11736,7 +11835,7 @@ static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
return ival;
}
-static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
if (ival <= LONG_MAX)
return PyInt_FromLong((long)ival);
@@ -11750,7 +11849,7 @@ static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#endif
}
-static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
+static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
return (size_t)-1;
View
22 zmq/_zmq.pyx
@@ -1046,21 +1046,39 @@ class Poller(object):
Parameters
----------
- timeout : int
- The timeout in microseconds. If None, no timeout (infinite).
+ timeout : float, int
+ The timeout in milliseconds. If None, no timeout (infinite). This
+ is in milliseconds to be compatible with :func:`select.poll`. The
+ underlying zmq_poll uses microseconds and we convert to that in
+ this function.
"""
if timeout is None:
timeout = -1
+ # Convert from ms -> us for zmq_poll.
+ timeout = int(timeout*1000.0)
+ if timeout < 0:
+ timeout = -1
return _poll(self.sockets.items(), timeout=timeout)
def select(rlist, wlist, xlist, timeout=None):
"""Return the result of poll as a lists of sockets ready for r/w.
This has the same interface as Python's built-in :func:`select` function.
+
+ Parameters
+ ----------
+ timeout : float, int
+ The timeout in seconds. This is in seconds to be compatible with
+ :func:`select.select`. The underlying zmq_poll uses microseconds and
+ we convert to that in this function.
"""
if timeout is None:
timeout = -1
+ # Convert from sec -> us for zmq_poll.
+ timeout = int(timeout*1000000.0)
+ if timeout < 0:
+ timeout = -1
sockets = []
for s in set(rlist + wlist + xlist):
flags = 0
View
5 zmq/eventloop/ioloop.py
@@ -185,7 +185,10 @@ def start(self):
self._running = True
while True:
# Never use an infinite timeout here - it can stall epoll
- poll_timeout = 0.2
+ # In pyzmq, we need to multiply the timeout by 1000 because
+ # the poll interface in pyzmq that is used here takes the timeout
+ # in ms. The value of 0.2 that exists in tornado is in seconds.
+ poll_timeout = 0.2*1000
# Prevent IO event starvation by delaying new callbacks
# to the next iteration of the event loop.

0 comments on commit 18f5d06

Please sign in to comment.