A unit of execution in a process.
A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex] or [Semaphore] is advised if working with shared objects.
[b]Note:[/b] Breakpoints won't break on code if it's running in a thread. This is a current limitation of the GDScript debugger.
https://docs.godotengine.org/en/3.4/tutorials/threads/using_multiple_threads.html
https://docs.godotengine.org/en/3.4/tutorials/threads/thread_safe_apis.html
https://godotengine.org/asset-library/asset/676
Returns the current [Thread]'s ID, uniquely identifying it among all threads. If the [Thread] is not running this returns an empty string.
Returns [code]true[/code] if this [Thread] is currently active. An active [Thread] cannot start work on a new method but can be joined with [method wait_to_finish].
Starts a new [Thread] that runs [code]method[/code] on object [code]instance[/code] with [code]userdata[/code] passed as an argument. Even if no userdata is passed, [code]method[/code] must accept one argument and it will be null. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure.
Joins the [Thread] and waits for it to finish. Returns what the method called returned.
A thread running with lower priority than normally.
A thread with a standard priority.
A thread running with higher priority than normally.