Wait for the thread to finish, may raise an
        exception (if any is uncaught during execution),
        and return the value returned by the target
        function.

def join(self, timeout=None):
        """
        Wait for the thread to finish, may raise an
        exception (if any is uncaught during execution),
        and return the value returned by the target
        function.
        """
        rv = self.thread.join(timeout)
        if self.err:
            raise self.err
        return self.val