print('Hello World')
loop.stop()
- loop = asyncio.get_event_loop()
+ loop = asyncio.new_event_loop()
# Schedule a call to hello_world()
loop.call_soon(hello_world, loop)
else:
loop.stop()
- loop = asyncio.get_event_loop()
+ loop = asyncio.new_event_loop()
# Schedule the first call to display_date()
end_time = loop.time() + 5.0
# Create a pair of connected file descriptors
rsock, wsock = socketpair()
- loop = asyncio.get_event_loop()
+ loop = asyncio.new_event_loop()
def reader():
data = rsock.recv(100)
.. rubric:: Examples
-* :ref:`Using asyncio.get_event_loop() and loop.run_forever()
+* :ref:`Using asyncio.new_event_loop() and loop.run_forever()
<asyncio_example_lowlevel_helloworld>`.
* :ref:`Using loop.call_later() <asyncio_example_call_later>`.