Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/requests_toolbelt/threaded/__pycache__/ |
Upload File : |
o IqOZ� � @ s� d Z ddlZddlZddlmZ ddlmZ G dd� de�ZG d d � d e�Z G dd� de �Z G d d� de �Zdd� Zg d�Z dS )zEModule implementing the Pool for :mod:``requests_toolbelt.threaded``.� N� )�thread� )�queuec @ sn e Zd ZdZdddejfdd�Zdd� Zedd� �Z edd d ��Z dd� Zd d� Zdd� Z dd� Zdd� ZdS )�Poola> Pool that manages the threads containing sessions. :param queue: The queue you're expected to use to which you should add items. :type queue: queue.Queue :param initializer: Function used to initialize an instance of ``session``. :type initializer: collections.Callable :param auth_generator: Function used to generate new auth credentials for the session. :type auth_generator: collections.Callable :param int num_process: Number of threads to create. :param session: :type session: requests.Session Nc s| |d u r t �� p d}|dk rtd��|� _t�� � _t�� � _|� _|p%t � _ |p*t � _|� _� fdd�t � j�D �� _d S )Nr z)Number of processes should at least be 1.c s&