403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
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:/Python315/Lib/test/support/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/support/__pycache__/threading_helper.cpython-315.opt-1.pyc
R
>lqj�$c��]PHs]PHs]PHs]PHs]PHs]PHs]PHs]QHGsQs	Qs
Qs\OQQk2s
QQks\OQQk2sQQ	2sQ
Qks\2sQP
-Q
ksPQ-1QksP!)�)�supportc�`�[O2[[O21!�N)�_thread�_count�len�	threading�	_dangling���2C:\Python315\\Lib\test\support\threading_helper.py�threading_setupr
s���>�>��S��!4�!4�5�5�5rc��UvqQo[OUP
Q5FD;o[[O2o[
O2oVa6:fJ9P!	P	[m[OQUQ
QUQUQWQ[W20
2SFDo[OQU802J	P!)g�?��errorz2threading_cleanup() failed to clean up threads in �.1fz  seconds
  before: thread count=z, dangling=z
  after: thread count=zDangling thread: )
r�sleeping_retry�listrr	rr�environment_altered�
print_warningr)�original_values�
orig_count�orig_ndangling�timeout�_�dangling_threads�count�threads*       r�threading_cleanuprs���!0��J��G�
�
#�
#�G�5�
9�
9�� �	� 3� 3�4����� �����:�#'�G�������c�]�"�",��[��8H�I!�!&��{�3�7G�3H�2I�	K�L�
#����� 1�&��<�=�#rc�H`�[OR2U1Qk2oU!)z{Use this function when threads are being used.  This will
ensure that the threads are cleaned up even when the test fails.
c�\:�[2oRU[U![Sh9hr)r
r)�args�key�funcs* �r�	decorator�reap_threads.<locals>.decorator>s)������	$���;��s�#���s�#�s��+)�	functools�wraps)r#r$sf r�reap_threadsr(:s(����_�_�T��$��$��rc#� �Ue[Oo[O2oPw�[O
2o[OUP
Q5FD7o[O2[O2oVA6:fJ5P!	[O
2U*
oQWU*
QUQ
QUQUQ0	o[U2g[O
2o[OSP
Q5FD6o[O2[O2oXA6:fJ5h	[O
2S*
oQWS*
QSQ
QSQSQ0	o[S2g9h3h)a 
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.
rz!wait_threads() failed to cleanup z threads after rz seconds (count: z
, old count: �))	r�
SHORT_TIMEOUTrr�time�	monotonicr�
gc_collect�AssertionError)r�	old_count�
start_timerr�dt�msgs&      r�wait_threads_exitr4Hsb������'�'����� �I�&�
��^�^�%�
��'�'��u�=�=�A���� ��N�N�$�E��!��	>����!�J�.�B�6�u�y�7H�6I�J$�$&�s�8�,�#�W�M�)��A�?�C�!��%�%���^�^�%�
��'�'��u�=�=�A���� ��N�N�$�E��!��	>����!�J�.�B�6�u�y�7H�6I�J$�$&�s�8�,�#�W�M�)��A�?�C�!��%�%�s0�F�%F�C�AF�AF�AF�>AF�Fc��Ue[OoUOU2UO2%cQUQ
Q0o[	U2gP!)z[Join a thread. Raise an AssertionError if the thread is still alive
after timeout seconds.
zfailed to join the thread in rz seconds)rr+�join�is_aliver/)rrr3s&& r�join_threadr8ksM�����'�'��
�K�K���
�����-�g�c�]�(�C���S�!�!�rc
#�� �]PHo[U2o,oSFD$oUO2UO	U2J&	Pw�U%cU2[O2o[]]2FD�oU]<*
oSFD8oUO[U[O2*
Q22J:	STt,tFDpDO2%fJUMJ	ooU%fL9[
O%fJ�[Q[U2U1*2J�	STt,tFDpDO2%fJUMJ	ooU%c?Ud UO[ O"2[%Q[U2*2gP![cPoCK�h9h[
O%c'[Q[S2[S21*2g9httohttohSTt,tFDpDO2%fJSMJ	LttohooS%c?Sd SO[ O"2[%Q[S2*2gh9hS%cS2[O2o[]]2FD�oS]<*
oSFD8oSO[S[O2*
Q22J:	STt,tFDpDO2%fJSMJ	LttohooS%fL9[
O%fJ�[Q[S2S1*2J�	STt,tFDpDO2%fJSMJ	LttohooS%c?Sd SO[ O"2[%Q[S2*2ghSTt,tFDpDO2%fJSMJ	LttohooS%c?Sd SO[ O"2[%Q[S2*2gh9h9h3h)rz/Can't start %d threads, only %d threads startedg{�G�z�?z7Unable to join %d threads during a period of %d minuteszUnable to join %d threads)�faulthandler�ImportErrorr�start�appendr�verbose�printrr,r-�ranger6�maxr7�dump_traceback�sys�stdoutr/)�threads�unlockr:�started�t�endtimers&&     r�
start_threadsrJwsD������7�m�G��G�Q�	������	����q�!��	�	Q�����n�n�&�G� ��B�<���2�
�� �A��F�F�3�w����)9�9�4�@�A�!�&-�>�g�����1�1�g��>����?�?�?��'�*-�g�,��)@�A�B�(�#*�:�'�Q�Z�Z�\�q�q�'�G�:���+� �/�/��
�
�;�$�%@�3�w�<�%O�P�P���C������	������G��7�|�S��\�2�3�4���?��;��'�:�'�Q�Z�Z�\�q�q�'��:�G�:���+� �/�/��
�
�;�$�%@�3�w�<�%O�P�P���!	Q�����n�n�&�G� ��B�<���2�
�� �A��F�F�3�w����)9�9�4�@�A�!�&-�>�g�����1�1�g��>��>����?�?�?��'�*-�g�,��)@�A�B�(�#*�:�'�Q�Z�Z�\�q�q�'��:�G�:���+� �/�/��
�
�;�$�%@�3�w�<�%O�P�P���#*�:�'�Q�Z�Z�\�q�q�'��:�G�:���+� �/�/��
�
�;�$�%@�3�w�<�%O�P�P��sT�Q!�F#�
Q!�+F7�I=�	H�A7H�G9�&G9�,	H�6H�!H�2Q!�5G>�G>�	Q!�#Q!�'<Q!�#	F4�-F4�0Q!�3F4�4Q!�7G6�'G6�6I=�9H�>Q!�I:�H,�%H,�+I:�;I:�?;I:�:Q!�=Q�?O$�A7O$�>L#�L#�"O$�2O$�
!O$�.Q�1N�N�Q�%Q�);Q�$Q�(P
�P
�Q�Q� ;Q�Q�Q!c�>`�\sQs]�snQsQsQsQsQsQs	Us
P!)�catch_threading_exceptiona�
Context manager catching threading.Thread exception using
threading.excepthook.

Attributes set when an exception is caught:

* exc_type
* exc_value
* exc_traceback
* thread

See threading.excepthook() documentation for these attributes.

These attributes are deleted at the context manager exit.

Usage:

    with threading_helper.catch_threading_exception() as cm:
        # code spawning a thread which raises an exception
        ...

        # check the thread exception, use cm attributes:
        # exc_type, exc_value, exc_traceback, thread
        ...

    # exc_type, exc_value, exc_traceback, thread attributes of cm no longer
    # exists at this point
    # (to avoid reference cycles)
c�N�PUmPUmPUmPUmPUmP!r)�exc_type�	exc_value�
exc_tracebackr�	_old_hook��selfs&r�__init__�"catch_threading_exception.__init__�s&����
����!��������rc��UOUmUOUmUOUmUOUmP!r)rNrOrPr)rSr!s&&r�_hook�catch_threading_exception._hook�s1���
�
��
������!�/�/����k�k��rc�\�[OUmUO[mU!r)r�
excepthookrQrWrRs&r�	__enter__�#catch_threading_exception.__enter__�s ��"�-�-���#�z�z�	���rc�B�UO[mU;U;U;U;P!r)rQrrZrNrOrPr)rS�exc_infos&*r�__exit__�"catch_threading_exception.__exit__�s#��#�~�~�	���M��N����Kr)rQrPrNrOr)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rTrWr[r_�__static_attributes__�__classdictcell__)�
__classdict__s@rrLrL�s#�����<�"��
�rrLc�&�U]6�cPgQ[-!)��return)�bool)�formats"r�__annotate__�_can_start_thread.__annotate__�s����4�rc��[OQ6Xc[OO![OQ6XcP
!P	!)a]Detect whether Python can start new threads.

Some WebAssembly platforms do not provide a working pthread
implementation. Thread support is stubbed and any attempt
to create a new thread fails.

- wasm32-wasi does not have threading.
- wasm32-emscripten can be compiled with or without pthread
  support (-s USE_PTHREADS / __EMSCRIPTEN_PTHREADS__).
�
emscripten�wasi)rC�platform�_emscripten_info�pthreadsr
rr�_can_start_threadrv�s6���|�|�|�#��#�#�,�,�,�	����	��r�modulec��QoU%c%[%f[OU2gP![O[U2!)z~Skip tests or modules that require working threading.

Can be used as a function/class decorator or to skip an entire module.
zrequires threading support)�can_start_thread�unittest�SkipTest�
skipUnless)rwr3s$ r�requires_working_threadingr}�s>��
'�C�
����#�#�C�(�(� ��"�"�#3�S�9�9rc�`	�]QHGoUe[U2o[V2%fU,U*o[O
U2n	U	1Qko[
29^tt^2oSTt,tFDo[OVW,UN3UQ5MJ!	oo[U29^tt^2PPP2UOd
UOgPPP2P!ttoh)%fhK:9h)%fhP!9h)z�
Run the worker function(s) concurrently in multiple threads.

If `worker_func` is a single callable, it is used for all threads.
If it is a list of callables, each callable is used for one thread.
)�Iterablec�<:�RO2UU-U@P!r)�wait)r#r!�kwargs�barriers&*,�r�wrapper_func�&run_concurrently.<locals>.wrapper_funcs��������d��f�r)�targetr!r�)
�collections.abcrr�
isinstancer�BarrierrL�ThreadrJrO)
�worker_func�nthreadsr!r�rr��cmr#�workersr�s
&&&&     @r�run_concurrentlyr��s����)����{�#���k�,�,�"�m�h�.������)�G��

#�	$�	$��$�
�#��
���L�}�t�}�V�T�#�	�
��7�
#�
#��$��<�<�#��,�,��$�
%�	$��
�$�
#��
%�	$�	$�sH�!C(�%'C�C(�!C	�#C(�9C(�C(�C%
�C%
� C(�(C9	�1C9	rr
)r�
contextlibr&rCrr,rz�testrr
rr(�contextmanagerr4r8rJrLrvryr}r�r
rr�<module>r�s������
�����6�>�<����&��&�D	"����'Q��'Q�T6�6�r�&%�&��
:��
:�,0�b�� r

Youez - 2016 - github.com/yon3zu
LinuXploit