mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-07 03:35:35 +00:00
14 lines
285 B
Python
14 lines
285 B
Python
import threading
|
|
|
|
|
|
def background(func):
|
|
"""
|
|
a threading decorator
|
|
use @background above the function you want to run in the background
|
|
"""
|
|
|
|
def background_func(*a, **kw):
|
|
threading.Thread(target=func, args=a, kwargs=kw).start()
|
|
|
|
return background_func
|