|Topic was automatically imported from the old Question2Answer platform.
Need to know if threading in Godot is preemptive or cooperative and it is different on different platforms?
Until now i didn’t even know cooperative threading was a thing. Thanks for asking this question.
hilfazer | 2021-03-23 11:33
Preemptive or cooperative using what viewpoint? Are you asking whether GDScript Threads are actual native operating system threads/processes or whether Godot handles the scheduling itself and actually runs all GDScript code in a single OS thread? Or do you actually want to know whether GDscript threads need to cooperate to each get runtime? Because if you’re interested in the latter, you can just answer your own question by creating and starting two threads that print something to the console every few seconds and looking whether they both print concurrently.
archeron | 2021-03-23 14:08
I’m specifically interested in knowing what model GDScript threading uses.
tx350z | 2021-03-23 14:14