mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-01 05:04:51 +00:00
Fix coroutine scheduling when adding/removing handlers
This commit is contained in:
parent
1e546099a3
commit
633e11531a
1 changed files with 2 additions and 2 deletions
|
|
@ -130,7 +130,7 @@ class Dispatcher:
|
|||
for lock in self.locks_list:
|
||||
lock.release()
|
||||
|
||||
asyncio.get_event_loop().run_until_complete(fn())
|
||||
asyncio.get_event_loop().create_task(fn())
|
||||
|
||||
def remove_handler(self, handler, group: int):
|
||||
async def fn():
|
||||
|
|
@ -146,7 +146,7 @@ class Dispatcher:
|
|||
for lock in self.locks_list:
|
||||
lock.release()
|
||||
|
||||
asyncio.get_event_loop().run_until_complete(fn())
|
||||
asyncio.get_event_loop().create_task(fn())
|
||||
|
||||
async def update_worker(self, lock):
|
||||
while True:
|
||||
|
|
|
|||
Loading…
Reference in a new issue