This commit is contained in:
j 2017-08-31 19:46:14 +02:00
parent 9145ef5df6
commit 216b880151
1 changed files with 6 additions and 6 deletions

View File

@ -38,13 +38,13 @@ def json_dumps(obj):
return json.dumps(obj, indent=indent, default=_to_json, ensure_ascii=False).encode()
def run_async(func):
@wraps(func)
def async_func(*args, **kwargs):
func_hl = Thread(target = func, args = args, kwargs = kwargs)
func_hl.start()
return func_hl
@wraps(func)
def async_func(*args, **kwargs):
func_hl = Thread(target=func, args=args, kwargs=kwargs)
func_hl.start()
return func_hl
return async_func
return async_func
def trim(docstring):
if not docstring: