HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/test/__pycache__/test_dummy_threading.cpython-37.opt-2.pyc
B

��g��@sJddlmZddlZddlZddlZGdd�dej�ZedkrFe�	�dS)�)�supportNc@s.eZdZGdd�dej�Zdd�Zdd�ZdS)�DummyThreadingTestCasec@seZdZdd�ZdS)z!DummyThreadingTestCase.TestThreadcCs�d}tjrtd|jd|d�t��t��td7atjrDttd�t��t	�
|�tjrjtd|jd�t��td8atjr�t|jdtd�t��t��dS)	NrZtaskzwill run forZsec�ztasks are runningZdonezis finished.)r�verbose�print�name�sema�acquire�mutex�running�release�timeZsleep)�selfZdelay�r�5/usr/local/lib/python3.7/test/test_dummy_threading.py�run
s$

z%DummyThreadingTestCase.TestThread.runN)�__name__�
__module__�__qualname__rrrrr�
TestThreadsrcCs(d|_tjdd�at��adag|_dS)N�
�)�valuer)�numtasks�
_threadingZBoundedSemaphorer�RLockr
r�threads)rrrr�setUp$s
zDummyThreadingTestCase.setUpcCspx6t|j�D](}|jd|d�}|j�|�|��qWtjrFtd�x|jD]}|�	�qNWtjrltd�dS)Nz<thread %d>)rz!waiting for all tasks to completezall tasks done)
�rangerrr�append�startrrr�join)r�i�trrr�
test_tasks.sz!DummyThreadingTestCase.test_tasksN)rrrrZThreadrrr$rrrrrs
r�__main__)
ZtestrZunittestZdummy_threadingrr
ZTestCaserr�mainrrrr�<module>s5