mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
asyncio: Enable the debug mode of event loops when the PYTHONASYNCIODEBUG
environment variable is set
This commit is contained in:
parent
d6de5d8455
commit
7b7120e159
6 changed files with 11 additions and 14 deletions
|
@ -141,7 +141,7 @@ if sys.platform != 'win32':
|
|||
policy = asyncio.get_event_loop_policy()
|
||||
self.loop = policy.new_event_loop()
|
||||
|
||||
# ensure that the event loop is passed explicitly in the code
|
||||
# ensure that the event loop is passed explicitly in asyncio
|
||||
policy.set_event_loop(None)
|
||||
|
||||
watcher = self.Watcher()
|
||||
|
@ -172,7 +172,7 @@ else:
|
|||
policy = asyncio.get_event_loop_policy()
|
||||
self.loop = asyncio.ProactorEventLoop()
|
||||
|
||||
# ensure that the event loop is passed explicitly in the code
|
||||
# ensure that the event loop is passed explicitly in asyncio
|
||||
policy.set_event_loop(None)
|
||||
|
||||
def tearDown(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue