gpt_output / utils /thread_utils.py
lancerrrrrrr's picture
Upload 24 files
d180100
Raw
History Blame Contribute Delete
315 Bytes
import threading
class ResultThread(threading.Thread):
def __init__(self, func, args):
super().__init__()
self.func = func
self.args = args
self.result = None
def run(self):
self.result = self.func(*self.args)
def get_result(self):
return self.result