This repository has been archived on 2024-02-23. You can view files and clone it, but cannot push or open issues or pull requests.
Auberge_Vagabonde/executor.py
Michel Roux d3a7ac0fc2
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Back to python + Gravesong
2022-01-18 20:43:45 +00:00

11 lines
211 B
Python

import asyncio
def executor(func):
async def wrapper(*args, **kwargs):
await asyncio.get_event_loop().run_in_executor(
None, lambda: func(*args, **kwargs)
)
return wrapper