�
�Wc�, c s. � d Z ddlZddlZddlmZ ddlmZmZ ddlm Z ddl
mZ g d�Z
ddl
mZ G d� de� Z G d
� d� Z G d� de� Z G d� de� Z G d� d� Ze�eZdS dS # e$ r dZY �Vw xY w# e$ r G d � d
e� ZY �bw xY w)z'A multi-producer, multi-consumer queue.� N)�deque)�heappush�heappop)� monotonic)�SimpleQueue)�Empty�Full�Queue�
PriorityQueue� LifoQueuer )r c � � e Zd ZdZdS )r z4Exception raised by Queue.get(block=0)/get_nowait().N��__name__�
__module__�__qualname__�__doc__� � �/usr/lib64/python3.12/queue.pyr r s � � � � � �>�>��r r c r )r z4Exception raised by Queue.put(block=0)/put_nowait().Nr r r r r r s � � � � � �:�:��Dr r c s� � e Zd ZdZdd�Zd� Zd� Zd� Zd� Zd� Z dd�Z
dd�Zd
� Zd� Z
d� Zd� Zd� Zd� Z eej( � Zd
S )r zjCreate a queue object with a given maximum size.
If maxsize is <= 0, the queue size is infinite.
r c s` � || _ | j |� t j � | _ t j
| j � | _ t j
| j � | _ t j
| j � | _ d| _ d S �Nr )
�maxsize�_init� threadingZLock�mutexZ Condition� not_empty�not_full�all_tasks_done�unfinished_tasks��selfr � r �__init__zQueue.__init__"