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 : /lib/python3.10/test/support/__pycache__/ |
Upload File : |
o }�5h� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ dd� Zdd� Z dd� Z ejdd d ��Zddd�Z ejdd d��ZG dd� d�ZdS )� N)�supportc C s t �� tj�� fS �N)�_thread�_count� threading� _dangling�copy� r r �4/usr/lib/python3.10/test/support/threading_helper.py�threading_setup s r c G s� d}t |�D ]L}t�� tjf}|| kr d S |sGdt_|d }t�d|d | d � d|d � dt|�� d�� |D ] }t�d |��� q:d }d }t � d � t�� qd S )N�d T� z&threading_cleanup() failed to cleanup r z threads (count: z, dangling: �)zDangling thread: �{�G�z�?)�ranger r r r r �environment_altered� print_warning�len�time�sleep� gc_collect)�original_values� _MAX_COUNT�count�values�dangling_threads�threadr r r �threading_cleanup s, �� � �r c s t �� �� fdd��}|S )z�Use this function when threads are being used. This will ensure that the threads are cleaned up even when the test fails. c s$ t � }z � | � W t|� S t|� w r )r r )�args�key��funcr r � decorator: s zreap_threads.<locals>.decorator)� functools�wraps)r! r"