bugfix
This commit is contained in:
parent
4b1fd99738
commit
4381c9e572
@ -14,10 +14,10 @@ def awaitify(sync_func):
|
|||||||
return async_func
|
return async_func
|
||||||
|
|
||||||
def coroutinify(func):
|
def coroutinify(func):
|
||||||
@wraps(sync_func)
|
@wraps(func)
|
||||||
async def async_func(*args):
|
async def async_func(*args):
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
return await loop.run_in_executor(None, sync_func, *args)
|
return await loop.run_in_executor(None, func, *args)
|
||||||
return async_func
|
return async_func
|
||||||
|
|
||||||
def to_func(func):
|
def to_func(func):
|
||||||
|
Loading…
Reference in New Issue
Block a user