In asyncio, does the event_loop still running after run_until_complete returned?
jfong at ms4.hinet.net
jfong at ms4.hinet.net
Tue Apr 3 23:20:20 EDT 2018
Ian於 2018年4月3日星期二 UTC+8下午1時38分57秒寫道:
> On Mon, Apr 2, 2018 at 9:01 PM, <jfong at ms4.hinet.net> wrote:
>
> def run_forever(self):
> """Run until stop() is called."""
> try:
> events._set_running_loop(self)
> while True:
> self._run_once()
> if self._stopping:
> break
> finally:
> self._stopping = False
> events._set_running_loop(None)
>
What's the purpose of resetting self._stopping back to False in finally clause?
--Jach
More information about the Python-list
mailing list