def METHOD_NAME(instance, *args, **kwargs):
    # This check must take place in the background thread.
    if should_raise and not getattr(instance, self.method_name).running:
        raise StopExecution
    # This call must be sent to the main thread.
    return async_method.__get__(instance, method)(*args, **kwargs)