B
Lj @ s d Z ddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZyddlZW n ek
r dZY nX ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ d
ZdZdZ e!e dZ"dZ#e$ Z%dd Z&dd Z'dd Z(d&ddZ)dd Z*e!e drndd Z+ndd Z+G d d! d!ej,Z-G d"d# d#ej.Z/G d$d% d%ej0Z1dS )'a Base implementation of event loop.
The event loop can be broken up into a multiplexer (the part
responsible for notifying us of I/O events) and the event loop proper,
which wraps a multiplexer with functionality for scheduling callbacks,
immediately or at a given time in the future.
Whenever a public API takes a callback, subsequent positional
arguments will be passed to the callback if/when it is called. This
avoids the proliferation of trivial lambdas implementing closures.
Keyword arguments for the callback are not supported; this is a
conscious design decision, leaving the door open for keyword arguments
to modify the meaning of the API call itself.
N ) constants)
coroutines)events)futures) protocols)sslproto)tasks)
transports)logger)
BaseEventLoopd g ?AF_INET6iQ c C s0 | j }tt|dd tjr$t|jS t| S d S )N__self__)Z _callback
isinstancegetattrr Taskreprr str)handlecb r 8/opt/alt/python37/lib64/python3.7/asyncio/base_events.py_format_handleE s
r c C s( | t jkrdS | t jkrdS t| S d S )Nz<pipe>z<stdout>)
subprocessPIPESTDOUTr )fdr r r _format_pipeN s
r c C sL t tdstdn4y| tjtjd W n tk
rF tdY nX d S )NSO_REUSEPORTz)reuse_port not supported by socket moduler zTreuse_port not supported by socket module, SO_REUSEPORT defined but not implemented.)hasattrsocket
ValueError
setsockopt
SOL_SOCKETr OSError)sockr r r _set_reuseportW s
r'