文件操作 - queues.cpython-311.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3.11/asyncio/__pycache__/queues.cpython-311.pyc
编辑文件内容
� *�Kg& � �� � d Z ddlZddlZddlmZ ddlmZ ddlmZ G d� de� � Z G d � d e� � Z G d� dej � � Z G d � de� � Z G d� de� � ZdS ))�Queue� PriorityQueue� LifoQueue� QueueFull� QueueEmpty� N)�GenericAlias� )�locks)�mixinsc � � e Zd ZdZdS )r z;Raised when Queue.get_nowait() is called on an empty Queue.N��__name__� __module__�__qualname__�__doc__� � �%/usr/lib/python3.11/asyncio/queues.pyr r s � � � � � �E�E��Dr r c � � e Zd ZdZdS )r zDRaised when the Queue.put_nowait() method is called on a full Queue.Nr r r r r r s � � � � � �N�N��Dr r c � � e Zd ZdZdd�Zd� Zd� Zd� Zd� Zd� Z d � Z ee� � Z d � Zd� Zed� � � Zd � Zd� Zd� Zd� Zd� Zd� Zd� Zd� ZdS )r a A queue, useful for coordinating producer and consumer coroutines. If maxsize is less than or equal to zero, the queue size is infinite. If it is an integer greater than 0, then "await put()" will block when the queue reaches maxsize, until an item is removed by get(). Unlike the standard library Queue, you can reliably know this Queue's size with qsize(), since your single-threaded asyncio application won't be interrupted between calling qsize() and doing an operation on the Queue. r c � � || _ t j � � | _ t j � � | _ d| _ t j � � | _ | j � � � | � |� � d S )Nr )�_maxsize�collections�deque�_getters�_putters�_unfinished_tasksr �Event� _finished�set�_init��self�maxsizes r �__init__zQueue.__init__! sl � ��� � $�)�+�+�� �#�)�+�+�� �!"����������������� � �7�����r c �6 � t j � � | _ d S �N)r r �_queuer"