15 lines
248 B
Python
15 lines
248 B
Python
from threading import Thread
|
|
|
|
|
|
class Task(Thread):
|
|
|
|
def __init__(self, target, name, **kwargs):
|
|
super().__init__(group=None, target=target, name=name, **kwargs)
|
|
|
|
@property
|
|
def is_running(self):
|
|
return self.is_alive()
|
|
|
|
|
|
|