bugfix
This commit is contained in:
parent
1976f645cb
commit
3ba6fdaf57
@ -6,6 +6,14 @@ import concurrent
|
|||||||
from functools import wraps
|
from functools import wraps
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
|
def get_event_loop():
|
||||||
|
try:
|
||||||
|
return asyncio.get_runnung_loop()
|
||||||
|
except:
|
||||||
|
loop = asyncio.new_event_loop()
|
||||||
|
asyncio.set_event_loop()
|
||||||
|
return loop
|
||||||
|
|
||||||
def awaitify(sync_func):
|
def awaitify(sync_func):
|
||||||
"""Wrap a synchronous callable to allow ``await``'ing it"""
|
"""Wrap a synchronous callable to allow ``await``'ing it"""
|
||||||
@wraps(sync_func)
|
@wraps(sync_func)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name=appPublic
|
name=appPublic
|
||||||
version = 5.2.9
|
version = 5.2.10
|
||||||
description = A set of base public functions or class
|
description = A set of base public functions or class
|
||||||
author = "yu moqing"
|
author = "yu moqing"
|
||||||
author_email = "yumoqing@gmail.com"
|
author_email = "yumoqing@gmail.com"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user