EMF_Camp_Badge/upip/threading.py

16 lines
359 B
Python
Raw Normal View History

import _thread
class Thread:
def __init__(self, group=None, target=None, name=None, args=(), kwargs=None):
self.target = target
self.args = args
self.kwargs = {} if kwargs is None else kwargs
def start(self):
_thread.start_new_thread(self.run, ())
def run(self):
self.target(*self.args, **self.kwargs)