Is there a risk of some sort of race condition while handling signals?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Samuel Pedrajas
:warning: Old Version Published before Godot 3 was released.

Basically I’m making a board game in which I move tokens on a board using a Tween. Two tokens can be merged, and when it happens I emit a signal to increase the score. The score variable is in an autoload script, so every token in the board is connecting a signal to this script. The thing is that I used the Tween.interpolate_method function to perform the animation, and it’s inside this method I’m interpolating where I emit the signal to update the score. My questions are then: how does Godot handle these signal emissions? am I going to have any risk of race condition?

Someone in the chat has copied me this from the docs:

void move_child( Node child_node, int to_pos )
Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.

which suggests me this is already handled by the engine. I’m just concerned about the specific case of doing so while tweening.

Thanks in advance.