Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Program Files/MySQL/MySQL Workbench 6.3 CE/python/lib/ |
Upload File : |
ó rKXc @ sæ d Z d d l m Z y d d l Z Wn e k rE d d l Z n Xd d l m Z d d l Z d d d d d g Z d e f d „ ƒ YZ d e f d „ ƒ YZ d d d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d S( s' A multi-producer, multi-consumer queue.iÿÿÿÿ( t timeN( t dequet Emptyt Fullt Queuet PriorityQueuet LifoQueuec B s e Z d Z RS( s4 Exception raised by Queue.get(block=0)/get_nowait().( t __name__t __module__t __doc__( ( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyR s c B s e Z d Z RS( s4 Exception raised by Queue.put(block=0)/put_nowait().( R R R ( ( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyR s c B sž e Z d Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z e d d „ Z d „ Z e d d „ Z d „ Z d „ Z e d „ Z d „ Z d „ Z RS( sj Create a queue object with a given maximum size. If maxsize is <= 0, the queue size is infinite. i c C sq | | _ | j | ƒ t j ƒ | _ t j | j ƒ | _ t j | j ƒ | _ t j | j ƒ | _ d | _ d S( Ni ( t maxsizet _initt _threadingt Lockt mutext Conditiont not_emptyt not_fullt all_tasks_donet unfinished_tasks( t selfR ( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyt __init__ s c C ss | j j ƒ zQ | j d } | d k rT | d k rD t d ƒ ‚ n | j j ƒ n | | _ Wd | j j ƒ Xd S( 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. i i s! task_done() called too many timesN( R t acquireR t ValueErrort notify_allt release( R t unfinished( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyt task_done- s c C sC | j j ƒ z! x | j r, | j j ƒ q WWd | j j ƒ Xd S( 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( R R R t waitR ( R ( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyt joinF s c C s* | j j ƒ | j ƒ } | j j ƒ | S( s9 Return the approximate size of the queue (not reliable!).( R R t _qsizeR ( R t n( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyt qsizeV s c C s+ | j j ƒ | j ƒ } | j j ƒ | S( sC Return True if the queue is empty, False otherwise (not reliable!).( R R R R ( R R ( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyt empty] s c C sC | j j ƒ d | j k o- | j ƒ k n } | j j ƒ | S( sB Return True if the queue is full, False otherwise (not reliable!).i ( R R R R R ( R R ( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyt fulld s % c C s6 | j j ƒ z| j d k r÷ | sF | j ƒ | j k rô t ‚ qô q÷ | d k r~ xŸ | j ƒ | j k rz | j j ƒ qU Wq÷ | d k r™ t d ƒ ‚ q÷ t ƒ | } xN | j ƒ | j k ró | t ƒ } | d k rà t ‚ n | j j | ƒ q© Wn | j | ƒ | j d 7_ | j j ƒ Wd | j j ƒ 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 non-negative 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 non-negative numberg i N( R R R R R t NoneR R t _timet _putR R t notifyR ( R t itemt blockt timeoutt endtimet remaining( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyt putk s* c C s | 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, t False( R R' ( ( sA C:\Program Files\MySQL\MySQL Workbench 6.3 CE\Python\Lib\Queue.pyt put_nowaitŽ s c C sý | j j ƒ zÛ | s. | j ƒ sÊ t ‚ qÊ nœ | d k r] x | j ƒ sY | j j ƒ q= Wnm | d k rx t d ƒ ‚ nR t ƒ | } xB | j ƒ sÉ | t ƒ } | d k r¶ t ‚ n | j j | ƒ qˆ W| j ƒ } | j j ƒ | SWd | j j ƒ 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 non-negative 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 non-negative numberg N( R R R R R# R R R$ t _getR R&