ACC SHELL

Path : /usr/lib/python/
File Upload :
Current File : //usr/lib/python/Queue.pyc

Ñò
nÄMc@s¶dZddklZddklZddkZddddd	gZdefd
„ƒYZdefd„ƒYZ	ddd„ƒYZ
de
fd
„ƒYZd	e
fd„ƒYZdS(s'A multi-producer, multi-consumer queue.iÿÿÿÿ(ttime(tdequeNtEmptytFulltQueuet
PriorityQueuet	LifoQueuecBseZdZRS(s4Exception raised by Queue.get(block=0)/get_nowait().(t__name__t
__module__t__doc__(((s/usr/lib/python2.6/Queue.pyR	scBseZdZRS(s4Exception raised by Queue.put(block=0)/put_nowait().(RRR	(((s/usr/lib/python2.6/Queue.pyR
scBsžeZdZdd„Zd„Zd„Zd„Zd„Zd„Ze	dd„Zd	„Ze	dd
„Z
d„Zd„Zed
„Zd„Zd„ZRS(sjCreate a queue object with a given maximum size.

    If maxsize is <= 0, the queue size is infinite.
    icCs£yddk}Wntj
oddk}nX||_|i|ƒ|iƒ|_|i|iƒ|_|i|iƒ|_	|i|iƒ|_
d|_dS(Niÿÿÿÿi(t	threadingtImportErrortdummy_threadingtmaxsizet_inittLocktmutext	Conditiont	not_emptytnot_fulltall_tasks_donetunfinished_tasks(tselfR
R
((s/usr/lib/python2.6/Queue.pyt__init__s	
cCsw|iiƒzU|id}|djo.|djotdƒ‚n|iiƒn||_Wd|iiƒXdS(s.Indicate that a formerly enqueued task is complete.

        Used by Queue consumer threads.  For each get() used to fetch a task,
        a subsequent call to task_done() tells the queue that the processing
        on the task is complete.

        If a join() is currently blocking, it will resume when all items
        have been processed (meaning that a task_done() call was received
        for every item that had been put() into the queue).

        Raises a ValueError if called more times than there were items
        placed in the queue.
        iis!task_done() called too many timesN(RtacquireRt
ValueErrort
notify_alltrelease(Rt
unfinished((s/usr/lib/python2.6/Queue.pyt	task_done-s




cCsE|iiƒz#x|io|iiƒqWWd|iiƒXdS(sƒBlocks until all items in the Queue have been gotten and processed.

        The count of unfinished tasks goes up whenever an item is added to the
        queue. The count goes down whenever a consumer thread calls task_done()
        to indicate the item was retrieved and all work on it is complete.

        When the count of unfinished tasks drops to zero, join() unblocks.
        N(RRRtwaitR(R((s/usr/lib/python2.6/Queue.pytjoinFs	

cCs*|iiƒ|iƒ}|iiƒ|S(s9Return the approximate size of the queue (not reliable!).(RRt_qsizeR(Rtn((s/usr/lib/python2.6/Queue.pytqsizeVs

cCs+|iiƒ|iƒ}|iiƒ|S(sCReturn True if the queue is empty, False otherwise (not reliable!).(RRR R(RR!((s/usr/lib/python2.6/Queue.pytempty]s


cCsD|iiƒd|ijo|iƒjn}|iiƒ|S(sBReturn True if the queue is full, False otherwise (not reliable!).i(RRR
R R(RR!((s/usr/lib/python2.6/Queue.pytfullds
&
cCsF|iiƒz$|idjoç|p$|iƒ|ijo
t‚qq|djo/x¨|iƒ|ijo|iiƒq[Wq|djotdƒ‚qtƒ|}xS|iƒ|ijo8|tƒ}|djo
t‚n|ii|ƒq´Wn|i	|ƒ|i
d7_
|iiƒWd|ii
ƒXdS(sPut 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).
        is#'timeout' must be a positive numbergiN(RRR
R RtNoneRRt_timet_putRRtnotifyR(Rtitemtblockttimeouttendtimet	remaining((s/usr/lib/python2.6/Queue.pytputks.







cCs|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.
        (R.tFalse(RR)((s/usr/lib/python2.6/Queue.pyt
put_nowaitŽscCs|iiƒzé|p|iƒp
t‚qØn§|djo&x–|iƒp|iiƒqBWnt|djotdƒ‚nWtƒ|}xF|iƒp8|tƒ}|djo
t‚n|ii|ƒq’W|iƒ}|i	i
ƒ|SWd|iiƒXdS(sRemove 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).
        is#'timeout' must be a positive numbergN(RRR RR%RRR&t_getRR(R(RR*R+R,R-R)((s/usr/lib/python2.6/Queue.pytget–s,










cCs
|itƒ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.
        (R2R/(R((s/usr/lib/python2.6/Queue.pyt
get_nowait¸scCstƒ|_dS(N(Rtqueue(RR
((s/usr/lib/python2.6/Queue.pyRÅscCs
||iƒS(N(R4(Rtlen((s/usr/lib/python2.6/Queue.pyR ÈscCs|ii|ƒdS(N(R4tappend(RR)((s/usr/lib/python2.6/Queue.pyR'ÌscCs
|iiƒS(N(R4tpopleft(R((s/usr/lib/python2.6/Queue.pyR1ÐsN(RRR	RRRR"R#R$tTrueR%R.R0R2R3RR5R R'R1(((s/usr/lib/python2.6/Queue.pyRs					#	"	
		cBsAeZdZd„Zed„Zeid„Zei	d„Z
RS(sœVariant of Queue that retrieves open entries in priority order (lowest first).

    Entries are typically tuples of the form:  (priority number, data).
    cCs
g|_dS(N(R4(RR
((s/usr/lib/python2.6/Queue.pyRÚscCs
||iƒS(N(R4(RR5((s/usr/lib/python2.6/Queue.pyR ÝscCs||i|ƒdS(N(R4(RR)theappush((s/usr/lib/python2.6/Queue.pyR'àscCs
||iƒS(N(R4(Rtheappop((s/usr/lib/python2.6/Queue.pyR1ãs(RRR	RR5R theapqR9R'R:R1(((s/usr/lib/python2.6/Queue.pyRÔs
	cBs5eZdZd„Zed„Zd„Zd„ZRS(sBVariant of Queue that retrieves most recently added entries first.cCs
g|_dS(N(R4(RR
((s/usr/lib/python2.6/Queue.pyRêscCs
||iƒS(N(R4(RR5((s/usr/lib/python2.6/Queue.pyR íscCs|ii|ƒdS(N(R4R6(RR)((s/usr/lib/python2.6/Queue.pyR'ðscCs
|iiƒS(N(R4tpop(R((s/usr/lib/python2.6/Queue.pyR1ós(RRR	RR5R R'R1(((s/usr/lib/python2.6/Queue.pyRçs
		((
R	RR&tcollectionsRR;t__all__t	ExceptionRRRRR(((s/usr/lib/python2.6/Queue.pyt<module>sÃ

ACC SHELL 2018