Skip to content

Commit 241e7b1

Browse files
committed
uasyncio.core: Add stop() method for loop.
To allow to stop loop from a callback function.
1 parent bf327f7 commit 241e7b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

uasyncio.core/uasyncio/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ def _run_and_stop():
128128
self.call_soon(_run_and_stop())
129129
self.run_forever()
130130

131+
def stop(self):
132+
self.call_soon((lambda: (yield StopLoop(0)))())
133+
131134
def close(self):
132135
pass
133136

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy