def wrapper(*args, **kwargs): """Creates a new thread with wrapped_func, adds an empty list to the thread for return value. Return a running thread""" ret_val = [] thread = Thread(target=wrapped_func, args=(ret_val, ) + args, kwargs=kwargs) thread.ret_val = ret_val thread.start() return thread