mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-02-10 00:27:48 +01:00
18 lines
307 B
Python
18 lines
307 B
Python
from functools import wraps
|
|
from threading import Thread
|
|
|
|
|
|
def run_task(func):
|
|
""" Runs function in separate thread """
|
|
|
|
@wraps(func)
|
|
def wrapper(*args, **kwargs):
|
|
task = Thread(target=func(*args, **kwargs))
|
|
task.start()
|
|
|
|
return wrapper
|
|
|
|
|
|
if __name__ == "__main__":
|
|
pass
|