'Wait for asynchronous call to finish.'

def wait(self, do_raise=True):

    if (self._gt is not None):
        try:
            self[:] = self._gt.wait()
        except Exception:
            if do_raise:
                raise
        finally:
            self._gt = None
