Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
‹EYc@sˆdZddlmZddlmZddlmZdddgZdefd	„ƒYZ	defd
„ƒYZ
dd
d„ƒYZdS(sðAn adaptation of Py2.3/2.4's Queue module which supports reentrant
behavior, using RLock instead of Lock for its mutex object.  The
Queue object is used exclusively by the sqlalchemy.pool.QueuePool
class.

This is to support the connection pool's usage of weakref callbacks to return
connections to the underlying Queue, which can in extremely
rare cases be invoked within the ``get()`` method of the Queue itself,
producing a ``put()`` inside the ``get()`` and therefore a reentrant
condition.

iÿÿÿÿ(tdeque(ttimei(t	threadingtEmptytFulltQueuecBseZdZRS(s4Exception raised by Queue.get(block=0)/get_nowait().(t__name__t
__module__t__doc__(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyRscBseZdZRS(s4Exception raised by Queue.put(block=0)/put_nowait().(RRR(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyR#scBs•eZdd„Zd„Zd„Zd„Zedd„Zd„Z	edd„Z
d„Zd	„Zd
„Z
d„Zd„Zd
„Zd„ZRS(icCsJ|j|ƒtjƒ|_tj|jƒ|_tj|jƒ|_dS(sxInitialize a queue object with a given maximum size.

        If `maxsize` is <= 0, the queue size is infinite.
        N(t_initRtRLocktmutext	Conditiont	not_emptytnot_full(tselftmaxsize((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyt__init__*s
cCs*|jjƒ|jƒ}|jjƒ|S(s9Return the approximate size of the queue (not reliable!).(Rtacquiret_qsizetrelease(Rtn((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pytqsize=s

cCs*|jjƒ|jƒ}|jjƒ|S(sKReturn True if the queue is empty, False otherwise (not
        reliable!).(RRt_emptyR(RR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pytemptyEs

cCs*|jjƒ|jƒ}|jjƒ|S(sJReturn True if the queue is full, False otherwise (not
        reliable!).(RRt_fullR(RR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pytfullNs

cCsú|jjƒzØ|s.|jƒrÊt‚qÊnœ|dkr]x|jƒrY|jjƒq=Wnm|dkrxtdƒ‚ntƒ|}xB|jƒrÉ|tƒ}|dkr¶t‚n|jj|ƒqˆW|j|ƒ|j	j
ƒWd|jjƒ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 numbergN(RRRRtNonetwaitt
ValueErrort_timet_putR
tnotifyR(Rtitemtblockttimeouttendtimet	remaining((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pytputWs&



	
cCs|j|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!((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyt
put_nowaitzscCsý|jjƒzÛ|s.|jƒrÊt‚qÊnœ|dkr]x|jƒrY|jjƒq=Wnm|dkrxtdƒ‚ntƒ|}xB|jƒrÉ|tƒ}|dkr¶t‚n|jj|ƒqˆW|jƒ}|j	j
ƒ|SWd|jjƒXdS(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).
        is#'timeout' must be a positive numbergN(R
RRRRRRRt_getRR R(RR"R#R$R%R!((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pytget‚s(


	
cCs
|jtƒ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.
        (R*R'(R((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyt
get_nowait¤scCs||_tƒ|_dS(N(RRtqueue(RR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyR	²s	cCs
t|jƒS(N(tlenR,(R((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyR¶scCs|jS(N(R,(R((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyRºscCs%|jdko$t|jƒ|jkS(Ni(RR-R,(R((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyR¾scCs|jj|ƒdS(N(R,tappend(RR!((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyRÂscCs
|jjƒS(N(R,tpopleft(R((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyR)ÆsN(RRRRRRtTrueRR&R(R*R+R	RRRRR)(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyR)s					#	"						N((RtcollectionsRRRtcompatRt__all__t	ExceptionRRR(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/util/queue.pyt<module>s