Created
April 8, 2021 10:19
-
-
Save imneonizer/7e81e58790b2fdcf3797b9091bd2c81f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
class Thread(threading.Thread): | |
def __init__(self, group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None): | |
threading.Thread.__init__(self, group, target, name, args, kwargs, daemon=daemon) | |
self._return = None | |
def run(self): | |
if self._target is not None: | |
self._return = self._target(*self._args, **self._kwargs) | |
def join(self): | |
threading.Thread.join(self) | |
return self._return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment