|Topic was automatically imported from the old Question2Answer platform.
I’m abusing of yield and signals. However, there are situations that some of my methods are yielding (and invalidating) only when certain conditions are met, otherwise do nothing.
Since the calling method of those methods are yielding those, I invalidate those no matter the conditions (because an exception occurs when yielding a method that does not invalidate) by doing
yield(get_tree().create_timer(0), "timeout") when the methods does nothing, but needs to be invalidated. Is there a more elegant way of instantly invalidating a function without doing this every time?