golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/cheroot/workers/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-310.pyc
199 B
Del
OK
threadpool.cpython-310.pyc
9.44 KB
Del
OK
Edit: threadpool.cpython-310.pyc
o �xeh) � @ s� d Z ddlmZmZmZ eZddlZddlZddl Z ddl Z ddlZddlm Z ddlmZ dZG dd� d�Ze� ZdZG d d � d ej�ZG dd� d�ZdS ) z8A thread-based worker pool. .. spelling:: joinable � )�absolute_import�division�print_functionN)�queue)� pass_none)�WorkerThread� ThreadPoolc @ s e Zd ZdZdd� Zdd� ZdS )� TrueyZerozDObject which equals and does math like the integer 0 but evals True.c C � |S �N� ��self�otherr r �N/opt/saltstack/salt/lib/python3.10/site-packages/cheroot/workers/threadpool.py�__add__ � zTrueyZero.__add__c C r r r r r r r �__radd__ r zTrueyZero.__radd__N)�__name__� __module__�__qualname__�__doc__r r r r r r r s r c @ s2 e Zd ZdZdZ dZ dZ dd� Zdd� ZdS )r aF Thread which continuously polls a Queue for Connection objects. Due to the timing issues of polling a Queue, a WorkerThread does not check its own 'ready' flag after it has started. To stop the thread, it is necessary to stick a _SHUTDOWNREQUEST object onto the Queue (one for each running WorkerThread). NFc sv d� _ |� _d� _d� _d� _d� _d� _� fdd�� fdd�� fdd�� fdd�d d� d d� d�� _tj � � � dS )z�Initialize WorkerThread instance. Args: server (cheroot.server.HTTPServer): web server object receiving this request Fr Nc s � j � jd u r tp� jj S r )� requests_seen� start_time� trueyzero�conn��s�r r r �<lambda>M s ��z'WorkerThread.__init__.<locals>.<lambda>c � � j � jd u r tp � jjj S r )� bytes_readr r r �rfiler r r r r R � ��c r r )� bytes_writtenr r r �wfiler r r r r W r# c s"