With Godot, would boolean thread-end signals require a mutex?

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

Operations on single variables aren’t atomic or whatever in Godot, right?

:bust_in_silhouette: Reply From: Wakatta

The rule of thumb is that if a Thread accesses a variable or uses a function that accesses a variable in the GlobalScope (meaning it can be changed by other Threads) then you use mutex_locks to synchronize that data.

In your case it would not be necessary since its only being used in that Thread alone.
That being said if you plan to use multiple Threads then you also need to have multiple booleans, one for each defined Thread