| Server IP : 138.197.176.125 / Your IP : 216.73.217.54 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/internet/test/__pycache__/ |
Upload File : |
U
W[d � @ s� d Z zddlZW n ek
r( dZY nX ddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ dd lmZ G d
d� de�ZG dd
� d
e�Ze� �e�� � dS )z6
Tests for implementations of L{IReactorWin32Events}.
� N)�verifyObject)�Failure)�isInIOThread)�IReactorWin32Events)�Deferred)�ReactorBuilder)�getThreadIDc @ sP e Zd ZdZdZd Z ZZdd� Zdd� Z dd � Z
d
d� Zdd
� Zdd� Z
dS )�Listenera�
L{Listener} is an object that can be added to a L{IReactorWin32Events}
reactor to receive callback notification when a Windows event is set. It
records what thread its callback is invoked in and fires a Deferred.
@ivar success: A flag which is set to C{True} when the event callback is
called.
@ivar logThreadID: The id of the thread in which the C{logPrefix} method is
called.
@ivar eventThreadID: The id of the thread in which the event callback is
called.
@ivar connLostThreadID: The id of the thread in which the C{connectionLost}
method is called.
@ivar _finished: The L{Deferred} which will be fired when the event callback
is called.
FNc C s
|| _ d S �N)� _finished)�self�finished� r �H/usr/lib/python3/dist-packages/twisted/internet/test/test_win32events.py�__init__/ s zListener.__init__c C s t � | _dS )Nr )r �logThreadID�r r r r � logPrefix3 s zListener.logPrefixc C s d| _ t� | _| j�d � d S )NT)�successr �
eventThreadIDr �callbackr r r r �occurred8 s zListener.occurredc C s t d��d S )NzSome problem)�RuntimeErrorr r r r �brokenOccurred>