Issue description:
I tried to use add_child with Thread for loading scene and it often crashes or do other invalid behavior. Maybe a note about it should be added to documentation of Thread ?
The SceneTree is not thread-safe. There should be more emphasis on what is and what isn't thread-safe, because some things like resources should be thread-safe for example (loading them is), but nodes aren't. I am myself curious about the details on this, and what are the guidelines since any mistake on this can lead to painful headbanging in an undefined future.
I would like to see Godot in general become more ready to allow multithreading in games (it's starting to happen more and more now as 8-core chips become mainstream).
Having the addition and removal of data being thread safe would be great (as it can become a bottleneck in more complex games).
It's my understanding that you need to use attach_thread / detach_thread to access such Godot APIs from a different thread from the one Godot uses for dispatching events.
It's more or less similar to what other UI toolkits provides.
That information is in the docs now: https://godot.readthedocs.io/en/latest/tutorials/threads/thread_safe_apis.html
Most helpful comment
The SceneTree is not thread-safe. There should be more emphasis on what is and what isn't thread-safe, because some things like resources should be thread-safe for example (loading them is), but nodes aren't. I am myself curious about the details on this, and what are the guidelines since any mistake on this can lead to painful headbanging in an undefined future.