I expect that internally Godot uses multiple threads to do things more efficiently. Is there anyplace where we can observe this and where we need to be wary of it?
For example could it be that _input() event is in one thread, and _physics_process() event is in another and that they can run concurrently?
To be clear, I don’t mean starting new threads manually. I mean some implicit threading that might result in a “gotcha!” moment, when two pieces of your code are suddenly running in parallel where you didn’t expect them to.
I do not have a definitive answer but in my experience Godot is very nice regarding warning you when something will be ran in parallel. Functions with that sort of behavior always mention it in their names and the Godot documentations always has warnings about this sort of behavior. This far it has never happened to me that I would have a problem because something would be running in parallel and I didn’t know about it.
Godot also does a lot of the work you mainly interface with on the same thread (which is why you need to be careful in GDScript to not do some highly blocking task like loading a giant resource and not doing it explicitly in parallel as it will freeze your game).