asyncio.AbstractEventLoop.create_task()

AbstractEventLoop.create_task(coro) Schedule the execution of a coroutine object: wrap it in a future. Return a Task object. Third-party event loops can use their own subclass of Task for interoperability. In this case, the result type is a subclass of Task. This method was added in Python 3.4.2. Use the async() function to support also older Python versions. New in version 3.4.2.

asyncio.AbstractEventLoop.create_server()

coroutine AbstractEventLoop.create_server(protocol_factory, host=None, port=None, *, family=socket.AF_UNSPEC, flags=socket.AI_PASSIVE, sock=None, backlog=100, ssl=None, reuse_address=None, reuse_port=None) Create a TCP server (socket type SOCK_STREAM) bound to host and port. Return a Server object, its sockets attribute contains created sockets. Use the Server.close() method to stop the server: close listening sockets. Parameters: The host parameter can be a string, in that case the TCP serv

asyncio.AbstractEventLoop.create_future()

AbstractEventLoop.create_future() Create an asyncio.Future object attached to the loop. This is a preferred way to create futures in asyncio, as event loop implementations can provide alternative implementations of the Future class (with better performance or instrumentation). New in version 3.5.2.

asyncio.AbstractEventLoop.create_datagram_endpoint()

coroutine AbstractEventLoop.create_datagram_endpoint(protocol_factory, local_addr=None, remote_addr=None, *, family=0, proto=0, flags=0, reuse_address=None, reuse_port=None, allow_broadcast=None, sock=None) Create datagram connection: socket family AF_INET or AF_INET6 depending on host (or family if specified), socket type SOCK_DGRAM. protocol_factory must be a callable returning a protocol instance. This method is a coroutine which will try to establish the connection in the background. Whe

asyncio.AbstractEventLoop.create_connection()

coroutine AbstractEventLoop.create_connection(protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None) Create a streaming transport connection to a given Internet host and port: socket family AF_INET or AF_INET6 depending on host (or family if specified), socket type SOCK_STREAM. protocol_factory must be a callable returning a protocol instance. This method is a coroutine which will try to establish the connection in t

asyncio.AbstractEventLoop.connect_write_pipe()

coroutine AbstractEventLoop.connect_write_pipe(protocol_factory, pipe) Register write pipe in eventloop. protocol_factory should instantiate object with BaseProtocol interface. pipe is file-like object. Return pair (transport, protocol), where transport supports WriteTransport interface. With SelectorEventLoop event loop, the pipe is set to non-blocking mode. This method is a coroutine.

asyncio.AbstractEventLoop.connect_read_pipe()

coroutine AbstractEventLoop.connect_read_pipe(protocol_factory, pipe) Register read pipe in eventloop. protocol_factory should instantiate object with Protocol interface. pipe is a file-like object. Return pair (transport, protocol), where transport supports the ReadTransport interface. With SelectorEventLoop event loop, the pipe is set to non-blocking mode. This method is a coroutine.

asyncio.AbstractEventLoop.close()

AbstractEventLoop.close() Close the event loop. The loop must not be running. Pending callbacks will be lost. This clears the queues and shuts down the executor, but does not wait for the executor to finish. This is idempotent and irreversible. No other methods should be called after this one.

asyncio.AbstractEventLoop.call_soon_threadsafe()

AbstractEventLoop.call_soon_threadsafe(callback, *args) Like call_soon(), but thread safe. See the concurrency and multithreading section of the documentation.

asyncio.AbstractEventLoop.call_soon()

AbstractEventLoop.call_soon(callback, *args) Arrange for a callback to be called as soon as possible. The callback is called after call_soon() returns, when control returns to the event loop. This operates as a FIFO queue, callbacks are called in the order in which they are registered. Each callback will be called exactly once. Any positional arguments after the callback will be passed to the callback when it is called. An instance of asyncio.Handle is returned, which can be used to cancel t