bugfix
This commit is contained in:
parent
fb9d2771d1
commit
52ae7b8187
@ -9,7 +9,8 @@ def awaitify(sync_func):
|
||||
"""Wrap a synchronous callable to allow ``await``'ing it"""
|
||||
@wraps(sync_func)
|
||||
async def async_func(*args, **kwargs):
|
||||
return sync_func(*args, **kwargs)
|
||||
loop = asyncio.get_event_loop()
|
||||
return await loop.run_in_executor(None, sync_func, *args, **kwargs)
|
||||
return async_func
|
||||
|
||||
def to_func(func):
|
||||
|
Loading…
Reference in New Issue
Block a user