| Server IP : 121.121.20.254 / Your IP : 216.73.217.51 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/test/support/__pycache__/ |
Upload File : |
�
���gk � �� � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d� Z d� Z
d� Zej dd�� Z
dd�Zej dd�� Z G d � d
� Zdefd�Z e� Zd
d�d�Zy)� N)�supportc �\ � t j � t t j � fS �N)�_thread�_count�len� threading� _dangling� � �2C:\Python312\\Lib\test\support\threading_helper.py�threading_setupr s � ��>�>��S��!4�!4�5�5�5r c �b � | \ }}d}t j |d�� D ]6 }t t j � }t j � }||k s�6 y dt _ t j d|d�d|� d|� d � dt � � �
� |D ] }t j d
|��� � y )Ng �?F��errorTz2threading_cleanup() failed to clean up threads in �.1fz seconds
before: thread count=z, dangling=z
after: thread count=zDangling thread: )
r �sleeping_retry�listr r
r r �environment_altered�
print_warningr )�original_values�
orig_count�orig_ndangling�timeout�_�dangling_threads�count�threads r
�threading_cleanupr s� � �!0��J���G�
�
#�
#�G�5�
9�� � � 3� 3�4����� ���J��� :� #'�G�������c�]� "�",��[��8H� I!�!&��{�3�7G�3H�2I� K�L�
#����� 1�&��<�=� #r c �B � � t j � � � fd�� }|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 �N �� t � } �| � t |� S # t |� w xY wr )r r )�args�key�funcs �r
� decoratorzreap_threads.<locals>.decorator>