mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 09:22:03 +00:00
Provide to use uvloop
This commit is contained in:
parent
798038484f
commit
cdbe9c82cc
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue