One Hat Cyber Team
Your IP :
10.30.1.1
Server IP :
103.148.201.5
Server :
Linux web-olt 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
Server Software :
Apache/2.4.52 (Ubuntu)
PHP Version :
8.1.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3.10
/
test
/
support
/
__pycache__
/
View File Name :
threading_helper.cpython-310.pyc
o E�h� � @ 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"