⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3.12
/
test
/
support
/
__pycache__
/
View File Name :
threading_helper.cpython-312.pyc
CRhq d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d Z d Z d Zej dd Z ddZej dd Z G d d ZdefdZ e Zd ddZy) N)supportc \ t j t t j fS N)_thread_countlen threading _dangling 4/usr/lib/python3.12/test/support/threading_helper.pythreading_setupr s >>S!4!4555r c b | \ }}d}t j |d D ]6 }t t j }t j }||k s6 y dt _ t j d|dd| d| d dt |D ] }t j d | y )Ng ?FerrorTz2threading_cleanup() failed to clean up threads in .1fz seconds before: thread count=z, dangling=z after: thread count=zDangling thread: ) r sleeping_retrylistr r r r environment_altered print_warningr )original_values orig_countorig_ndanglingtimeout_dangling_threadscountthreads r threading_cleanupr s !0JG # #G5 9 3 34 J : #'Gc] "",[8H I!!&{37G3H2I KL # 1&<= #r c B t j fd }|S )zUse 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 )argskeyfuncs r decoratorzreap_threads.
.decorator> s) $;s#s#s $) functoolswraps)r$ r% s ` r reap_threadsr( : s( __T$ $ r c # K | t j } t j } d t j }t j | d D ]1 }t j t j }||k s1 y t j |z }d|z d|dd| d| d }t | # t j }t j | d D ]1 }t j t j }||k s1 w t j |z }d|z d|dd| d| d }t | xY ww) aH bpo-31234: Context manager to wait until all threads created in the with statement exit. Use _thread.count() to check if threads exited. Indirectly, wait until threads exit the internal t_bootstrap() C function of the _thread module. threading_setup() and threading_cleanup() are designed to emit a warning if a test leaves running threads in the background. This context manager is designed to cleanup threads started by the _thread.start_new_thread() which doesn't allow to wait for thread exit, whereas thread.Thread has a join() method. NFr z!wait_threads() failed to cleanup z threads after r z seconds (count: z , old count: )) r SHORT_TIMEOUTr r time monotonicr gc_collectAssertionError)r old_count start_timer r dtmsgs r wait_threads_exitr4 H sa '' I& ^^% ''u=A NN$E ! > !J.B6uy7H6I J$$&s8