mirror of https://github.com/MagicStack/uvloop.git
win/tests: Use IOCP asyncio loop on Windows
This commit is contained in:
parent
6d8636cbe8
commit
5bc48b3dfe
|
@ -306,6 +306,10 @@ class AIOTestCase(BaseTestCase):
|
||||||
super().tearDown()
|
super().tearDown()
|
||||||
|
|
||||||
def new_loop(self):
|
def new_loop(self):
|
||||||
|
if hasattr(asyncio, 'ProactorEventLoop'):
|
||||||
|
# On Windows try to use IOCP event loop.
|
||||||
|
return asyncio.ProactorEventLoop()
|
||||||
|
else:
|
||||||
return asyncio.new_event_loop()
|
return asyncio.new_event_loop()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue