Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/ |
Upload File : |
o �bI � @ s� d Z zddlZW n ey dZY nw ddlmZ ddlmZ ddlmZ ddl m Z ddlmZ ddl mZmZ G d d � d �ZG dd� de �Ze� �e�� � dS ) z6 Tests for implementations of L{IReactorWin32Events}. � N)�verifyObject)�Deferred)�IReactorWin32Events)�ReactorBuilder)�Failure)�getThreadID�isInIOThreadc @ 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 � logPrefix2 s zListener.logPrefixc C s d| _ t� | _| j�d � d S )NT)�successr � eventThreadIDr �callbackr r r r �occurred6 s zListener.occurredc C s t d��)NzSome problem)�RuntimeErrorr r r r �brokenOccurred; � zListener.brokenOccurredc C s t d�S )NzEntirely different problem)�EnvironmentErrorr r r r �returnValueOccurred>