HEX
Server: LiteSpeed
System: Linux cluster02.load-balancer.x2.network 4.18.0-553.51.1.lve.1.el8.x86_64 #1 SMP Wed May 14 14:34:57 UTC 2025 x86_64
User: kbdhpghp (1098)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/requests_toolbelt/threaded/__pycache__/thread.cpython-36.pyc
3

�P\��@s>dZddlZddlZddljZddlmZGdd�de�Z	dS)z*Module containing the SessionThread class.�N�)�queuec@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�
SessionThreadcCs$||_||_|j�||_||_dS)N)�_session�_jobs�_create_worker�
_responses�_exceptions)�selfZinitialized_sessionZ	job_queueZresponse_queueZexception_queue�r�/usr/lib/python3.6/thread.py�__init__s
zSessionThread.__init__cCs4tj|jtj�d�|_d|j_d|j_|jj�dS)N)�target�nameTr)	�	threadingZThread�
_make_request�uuidZuuid4�_workerZdaemonZ_state�start)r
rrrrszSessionThread._create_workercCsnz\y|jjf|�}Wn4tjk
rH}z|jj||f�WYdd}~XnX|jj||f�Wd|jj�XdS)N)	rZrequest�excZRequestExceptionr	ZputrrZ	task_done)r
�kwargsZresponse�errr�_handle_requests"zSessionThread._handle_requestcCs<x6y|jj�}Wntjk
r(PYnX|j|�qWdS)N)rZ
get_nowaitrZEmptyr)r
rrrrr&szSessionThread._make_requestcCs
|jj�S)z*Proxy to the thread's ``is_alive`` method.)r�is_alive)r
rrrr/szSessionThread.is_alivecCs|jj�dS)z&Join this thread to the master thread.N)r�join)r
rrrr3szSessionThread.joinN)	�__name__�
__module__�__qualname__r
rrrrrrrrrr
s	
	r)
�__doc__rrZrequests.exceptions�
exceptionsrZ_compatr�objectrrrrr�<module>s