%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/internet/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/internet/__pycache__/asyncioreactor.cpython-312.pyc |
� Ϫ�fy+ � � � d Z ddlZddlZddlmZmZ ddlmZmZm Z ddl mZ ddlm Z ddlmZ ddlmZmZmZ dd lmZ dd lmZ ee� G d� de� � Zdd �Zy)z' asyncio-based reactor implementation. � N)�AbstractEventLoop�get_event_loop)�Dict�Optional�Type)�implementer)�FileDescriptor)� IReactorFDSet)�_NO_FILEDESC�PosixReactorBase�_ContinuousPolling)�Logger)�callWithLoggerc � � � e Zd ZdZdZ e� Zddee f� fd� Z d� Z d� Zd� Zd� Z d � Zd � Zd� Zd� Zd � Zd� Zdd�Z� fd�Z� fd�Zd� Zd� Zd� Zd� Zd� Z� xZS )�AsyncioSelectorReactora� Reactor running on top of L{asyncio.SelectorEventLoop}. On POSIX platforms, the default event loop is L{asyncio.SelectorEventLoop}. On Windows, the default event loop on Python 3.7 and older is C{asyncio.WindowsSelectorEventLoop}, but on Python 3.8 and newer the default event loop is C{asyncio.WindowsProactorEventLoop} which is incompatible with L{AsyncioSelectorReactor}. Applications that use L{AsyncioSelectorReactor} on Windows with Python 3.8+ must call C{asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())} before instantiating and running L{AsyncioSelectorReactor}. F� eventloopc � �� |�t � }n|}t j dk( r ddlm} t ||� rt d|� �� �|| _ i | _ i | _ t | � | _ d | _ d | _ t �| �= � y )N�win32r )�ProactorEventLoopz)ProactorEventLoop is not supported, got: )r �sys�platform�asyncior � isinstance� TypeError�_asyncioEventloop�_writers�_readersr �_continuousPolling�_scheduledAt�_timerHandle�super�__init__)�selfr � _eventloopr � __class__s ��A/usr/lib/python3/dist-packages/twisted/internet/asyncioreactor.pyr"