diff options
author | Damien George <damien.p.george@gmail.com> | 2020-04-09 13:15:47 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-04-13 22:16:52 +1000 |
commit | db137e70dcf67de26828e17c2d3dc9d21e971eb0 (patch) | |
tree | b6e5e8cd0b2f63ed169379a33c3021c156008148 /docs/library/uasyncio.rst | |
parent | 1bbc15dd15b232f833b6cc2066bd9ca2b7fe6b66 (diff) |
extmod/uasyncio: Add Loop.new_event_loop method.
This commit adds Loop.new_event_loop() which is used to reset the singleton
event loop. This functionality is put here instead of in Loop.close() to
make it possible to write code that is compatible with CPython.
Diffstat (limited to 'docs/library/uasyncio.rst')
-rw-r--r-- | docs/library/uasyncio.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/library/uasyncio.rst b/docs/library/uasyncio.rst index 9cb0ca9bb..0f363a076 100644 --- a/docs/library/uasyncio.rst +++ b/docs/library/uasyncio.rst @@ -244,6 +244,13 @@ Event Loop Return the event loop used to schedule and run tasks. See `Loop`. +.. function:: new_event_loop() + + Reset the event loop and return it. + + Note: since MicroPython only has a single event loop this function just + resets the loop's state, it does not create a new one. + .. class:: Loop() This represents the object which schedules and runs tasks. It cannot be |