| Server IP : 65.1.209.187 / Your IP : 216.73.216.144 Web Server : nginx/1.24.0 System : Linux ip-172-31-5-206 6.14.0-1015-aws #15~24.04.1-Ubuntu SMP Tue Sep 23 22:44:48 UTC 2025 x86_64 User : ( 1001) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/twisted/test/__pycache__/ |
Upload File : |
�
oj
� �� � d Z ddlZddlZddlmZ ddlZdZddlm Z ddl
mZmZ G d� d � Z
e j e
� G d
� de� Z G d� d
e� Zy# e$ r dZY �Jw xY w)z)
Tests for L{twisted.python.threadable}.
� N)�skipIfFT)�
threadable)�FailTest�SynchronousTestCasec � � e Zd ZdgZdZdZd� Zy)�
TestObject�aMethod���� c �� � t d� D ]g }| j | j c| _ | _ | j | j z | _ | j dk( r�TJ d| j fz � � y )N�
r zz == %d, not 0 as expected)�range�y�x�z)�self�is �>/usr/lib/python3/dist-packages/twisted/test/test_threadable.pyr zTestObject.aMethod sb � ��r�� I�A�!�V�V�T�V�V�N�D�F�D�F��V�V�d�f�f�_�D�F��6�6�Q�;�H� <����y� H�H�;� I� N)�__name__�
__module__�__qualname__�synchronizedr r r � r r r r s � ��;�L�
�A� �A�Ir r c �Z � e Zd Zd� Zd� Z eed� d� � Z eed� d� � Zd� Z y)�SynchronizationTestsc � � | j t j t j � � t j d� y)z�
Reduce the CPython check interval so that thread switches happen much
more often, hopefully exercising more possible race conditions. Also,
delay actual test startup until the reactor has been started.
gH�����z>N)�
addCleanup�sys�setswitchinterval�getswitchinterval�r s r �setUpzSynchronizationTests.setUp) s/ � �
����-�-�s�/D�/D�/F�G����i�(r c �X � | j dt j j � y)zk
The name of a synchronized method is inaffected by the synchronization
decorator.
r N)�assertEqualr r r r"