File: //lib64/python3.6/site-packages/zmq/backend/cffi/__pycache__/context.cpython-36.pyc
3
VS�_� � @ sV d Z ddlmZmZ ddlmZmZmZ ddlm Z m
Z
mZ G dd� de�Z
dgZdS ) zzmq Context class� )�C�ffi)�EINVAL�
IO_THREADS�LINGER� )�ZMQError�InterruptedSystemCall� _check_rcc @ sV e Zd ZdZdZdZdZddd�Zedd� �Z edd � �Z
d
d� Zdd
� Zdd� Z
dS )�ContextNFr c C sp |rt jd|�| _d| _n d| _|dks0tt��tj� | _| jt jkrRttj � ��|sftj
| jt|� d| _d S )Nzvoid *TFr )
r �cast�_zmq_ctx�_shadowr r r Zzmq_ctx_newZNULLZ zmq_errno�zmq_ctx_setr �_closed)�selfZ
io_threadsZshadow� r �/usr/lib64/python3.6/context.py�__init__ s
zContext.__init__c C s t tjd| j��S )z,The address of the underlying libzmq contextZsize_t)�intr r r
)r r r r �
underlying$ s zContext.underlyingc C s | j S )N)r )r r r r �closed) s zContext.closedc C s t j| j||�}t|� dS )z6set a context option
see zmq_ctx_set
N)r r r
r
)r �option�value�rcr r r �set- s zContext.setc C s t j| j|�}t|dd� |S )z4get context option
see zmq_ctx_get
F)Zerror_without_errno)r Zzmq_ctx_getr
r
)r r r r r r �get5 s zContext.getc C sH | j r
d S tj| j�}yt|� W n tk
r6 Y nX d | _d| _d S )NT)r r Zzmq_ctx_destroyr
r
r r )r r r r r �term>