traits_futures.asyncio.event_loop module
IEventLoop implementation wrapping an asyncio event loop.
-
class traits_futures.asyncio.event_loop.AsyncioEventLoop(*, event_loop=None)[source]
Bases: object
IEventLoop implementation wrapping an asyncio event loop.
- Parameters:
event_loop (asyncio.AbstractEventLoop, optional) – The asyncio event loop to wrap. If not provided, a new
event loop will be created and used.
-
close()[source]
Free any resources allocated by this object.
-
helper()[source]
Return a new event loop helper.
- Returns:
event_loop_helper
- Return type:
IEventLoopHelper
-
pingee(on_ping)[source]
Return a new pingee.
- Parameters:
on_ping – Zero-argument callable, called on the main thread (under a running
event loop) as a result of each ping sent. The return value of the
callable is ignored.
- Returns:
pingee
- Return type:
IPingee