def run(self): # here would be your long running function or a call to a server # or something like that time.sleep(1) try: xlAsyncReturn(self.__async_handle, self.__x) #this doenst work except Exception as e: logging.error(e)