Tryag File Manager
Home
-
Turbo Force
Current Path :
/
home
/
cluster1
/
data
/
bu01
/
1121861
/
html
/
TMAT
/
Python24
/
Lib
/
Upload File :
New :
File
Dir
//home/cluster1/data/bu01/1121861/html/TMAT/Python24/Lib/Queue.pyc
mò ¯Ac�����������@���sr���d��Z��d�k�l�Z�d�k�l�Z�d�d�d�g�Z�d�e�f�d�„��ƒ��YZ�d�e�f�d�„��ƒ��YZ�d�f��d�„��ƒ��YZ �d �S( ���s'���A multi-producer, multi-consumer queue.(���s���time(���s���dequet���Emptyt���Fullt���Queuec�����������B���s���t��Z�d��Z�RS(���s4���Exception raised by Queue.get(block=0)/get_nowait().(���t���__name__t ���__module__t���__doc__(����(����(����t���C:\Python24\lib\Queue.pyR�������s���c�����������B���s���t��Z�d��Z�RS(���s4���Exception raised by Queue.put(block=0)/put_nowait().(���R���R���R���(����(����(����R���R������s���c�����������B���s•���t��Z�d�d�„�Z�d�„��Z�d�„��Z�d�„��Z�e�d��d�„�Z�d�„��Z �e�d��d�„�Z �d �„��Z�d �„��Z�d�„��Z �d�„��Z�d �„��Z�d�„��Z�d�„��Z�RS(���Ni����c���������C���sv���y �d�k��}�Wn�t�j �o�d�k�}�n�X|��i�|�ƒ�|�i�ƒ��|��_�|�i�|��i�ƒ�|��_ �|�i�|��i�ƒ�|��_ �d�S(���sv���Initialize a queue object with a given maximum size. If maxsize is <= 0, the queue size is infinite. N(���t ���threadingt���ImportErrort���dummy_threadingt���selft���_initt���maxsizet���Lockt���mutext ���Conditiont ���not_emptyt���not_full(���R ���R���R���(����(����R���t���__init__���s����� c���������C���s*���|��i�i�ƒ��|��i�ƒ��}�|��i�i�ƒ��|�S(���s9���Return the approximate size of the queue (not reliable!).N(���R ���R���t���acquiret���_qsizet���nt���release(���R ���R���(����(����R���t���qsize'���s ����� c���������C���s*���|��i�i�ƒ��|��i�ƒ��}�|��i�i�ƒ��|�S(���sC���Return True if the queue is empty, False otherwise (not reliable!).N(���R ���R���R���t���_emptyR���R���(���R ���R���(����(����R���t���empty.���s ����� c���������C���s*���|��i�i�ƒ��|��i�ƒ��}�|��i�i�ƒ��|�S(���sB���Return True if the queue is full, False otherwise (not reliable!).N(���R ���R���R���t���_fullR���R���(���R ���R���(����(����R���t���full5���s ����� c���������C���s��|��i�i�ƒ��zæ�|�p�|��i�ƒ��o �t�‚�qØ�n§�|�d�j�o&�x–�|��i�ƒ��o�|��i�i�ƒ��qB�Wnt�|�d�j��o�t �d�ƒ�‚�n�t �ƒ��|�}�xF�|��i�ƒ��o8�|�t �ƒ��}�|�d�j�o �t�‚�n�|��i�i�|�ƒ�q’�W|��i �|�ƒ�|��i�i�ƒ��Wd�|��i�i�ƒ��Xd�S(���s��Put an item into the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until a free slot is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Full exception if no free slot was available within that time. Otherwise ('block' is false), put an item on the queue if a free slot is immediately available, else raise the Full exception ('timeout' is ignored in that case). i����s#���'timeout' must be a positive numberf0.0N(���R ���R���R���t���blockR���R���t���timeoutt���Nonet���waitt ���ValueErrort���_timet���endtimet ���remainingt���_putt���itemR���t���notifyR���(���R ���R%���R���R���R#���R"���(����(����R���t���put<���s.���� � � � �c���������C���s���|��i�|�t�ƒ�S(���s©���Put an item into the queue without blocking. Only enqueue the item if a free slot is immediately available. Otherwise raise the Full exception. N(���R ���R'���R%���t���False(���R ���R%���(����(����R���t ���put_nowait]���s�����c���������C���s��|��i�i�ƒ��zé�|�p�|��i�ƒ��o �t�‚�qØ�n§�|�d�j�o&�x–�|��i�ƒ��o�|��i�i�ƒ��qB�Wnt�|�d�j��o�t �d�ƒ�‚�n�t �ƒ��|�}�xF�|��i�ƒ��o8�|�t �ƒ��}�|�d�j�o �t�‚�n�|��i�i�|�ƒ�q’�W|��i �ƒ��}�|��i�i�ƒ��|�SWd�|��i�i�ƒ��Xd�S(���s��Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available within that time. Otherwise ('block' is false), return an item if one is immediately available, else raise the Empty exception ('timeout' is ignored in that case). i����s#���'timeout' must be a positive numberf0.0N(���R ���R���R���R���R���R����R���R���R���R ���R!���R"���R#���t���_getR%���R���R&���R���(���R ���R���R���R%���R#���R"���(����(����R���t���gete���s0���� � � � �c���������C���s ���|��i�t�ƒ�S(���s«���Remove and return an item from the queue without blocking. Only get an item if one is immediately available. Otherwise raise the Empty exception. N(���R ���R+���R(���(���R ���(����(����R���t ���get_nowait‡���s�����c���������C���s���|�|��_��t�ƒ��|��_�d��S(���N(���R���R ���t���dequet���queue(���R ���R���(����(����R���R���”���s���� c���������C���s ���t��|��i�ƒ�S(���N(���t���lenR ���R.���(���R ���(����(����R���R���˜���s����c���������C���s���|��i�S(���N(���R ���R.���(���R ���(����(����R���R���œ���s����c���������C���s&���|��i�d�j�o�t�|��i�ƒ�|��i�j�S(���Ni����(���R ���R���R/���R.���(���R ���(����(����R���R��� ���s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R ���R.���t���appendR%���(���R ���R%���(����(����R���R$���¤���s����c���������C���s ���|��i�i�ƒ��S(���N(���R ���R.���t���popleft(���R ���(����(����R���R*���¨���s����(���R���R���R���R���R���R���t���TrueR���R'���R)���R+���R,���R���R���R���R���R$���R*���(����(����(����R���R������s��� ! " N( ���R���t���timeR!���t���collectionsR-���t���__all__t ���ExceptionR����R���R���(���R-���R���R5���R���R!���R����(����(����R���t���?���s���