mirror of
https://github.com/fastogt/pyfastogt
synced 2025-02-12 12:51:53 +00:00
Decorators
This commit is contained in:
parent
117d0aeebd
commit
3d2007bda0
1 changed files with 9 additions and 0 deletions
9
pyfastogt/decorators.py
Normal file
9
pyfastogt/decorators.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from threading import Thread
|
||||
|
||||
|
||||
def thread_async(f):
|
||||
def wrapper(*args, **kwargs):
|
||||
thr = Thread(target=f, args=args, kwargs=kwargs)
|
||||
thr.start()
|
||||
|
||||
return wrapper
|
Loading…
Reference in a new issue