mirror of
https://github.com/jillesca/pyats_server.git
synced 2026-11-19 02:17:50 +00:00
11 lines
204 B
Python
11 lines
204 B
Python
import asyncio
|
|
from functools import wraps
|
|
|
|
|
|
def asyncify(func):
|
|
@wraps(func)
|
|
async def wrapper(*args, **kwargs):
|
|
return await asyncio.to_thread(func, *args, **kwargs)
|
|
|
|
return wrapper
|