Provide to use uvloop

This commit is contained in:
Alex Root Junior 2017-11-13 21:05:44 +02:00
parent 798038484f
commit cdbe9c82cc

View file

@ -21,7 +21,8 @@ def task_factory(loop: asyncio.BaseEventLoop, coro: typing.Coroutine):
:rtype: :obj:`asyncio.Task` :rtype: :obj:`asyncio.Task`
""" """
# Is not allowed when loop is closed. # Is not allowed when loop is closed.
loop._check_closed() if loop.is_closed():
raise RuntimeError('Event loop is closed.')
task = asyncio.Task(coro, loop=loop) task = asyncio.Task(coro, loop=loop)