Does multiple thread is created when the same script run in multiple nodes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CallmeMark

I am making an RTS game and I want to use multithreading for functions that are focused on calculating math stuff. I’m wondering does every character that uses the same script with multithreading in it will create new threads when spawned or are they going to use the same thread.

From what I understand they will create new threads but I’m not sure

I’m not really familiar with how multithreading is used in RTS games

:bust_in_silhouette: Reply From: kelaia

It’s probably spawning a thread for each node (assuming that the script used has the code to spawn a thread). You should create a thread pool to handle this stuff for you.