apppublic/appPublic/background.py

12 lines
246 B
Python
Raw Normal View History

2020-09-26 21:54:43 +08:00
from threading import Thread
class Background(Thread):
def __init__(self,func, *args,**kw):
Thread.__init__(self)
self.__callee = func
self.__args = args
self.__kw = kw
def run(self):
2021-01-31 14:40:34 +08:00
return self.__callee(*self.__args, **self.__kw)