mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
classref: Sync with current master branch (96cdbbe)
This commit is contained in:
@@ -29,7 +29,7 @@ To ensure proper cleanup without crashes or deadlocks, when a **Thread**'s refer
|
||||
|
||||
- It must not be waiting on any :ref:`Semaphore<class_Semaphore>` objects.
|
||||
|
||||
- :ref:`wait_to_finish<class_Thread_method_wait_to_finish>` should have been called on it.
|
||||
- :ref:`wait_to_finish()<class_Thread_method_wait_to_finish>` should have been called on it.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
@@ -118,7 +118,7 @@ Method Descriptions
|
||||
|
||||
:ref:`String<class_String>` **get_id**\ (\ ) |const| :ref:`🔗<class_Thread_method_get_id>`
|
||||
|
||||
Returns the current **Thread**'s ID, uniquely identifying it among all threads. If the **Thread** has not started running or if :ref:`wait_to_finish<class_Thread_method_wait_to_finish>` has been called, this returns an empty string.
|
||||
Returns the current **Thread**'s ID, uniquely identifying it among all threads. If the **Thread** has not started running or if :ref:`wait_to_finish()<class_Thread_method_wait_to_finish>` has been called, this returns an empty string.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -130,9 +130,9 @@ Returns the current **Thread**'s ID, uniquely identifying it among all threads.
|
||||
|
||||
:ref:`bool<class_bool>` **is_alive**\ (\ ) |const| :ref:`🔗<class_Thread_method_is_alive>`
|
||||
|
||||
Returns ``true`` if this **Thread** is currently running the provided function. This is useful for determining if :ref:`wait_to_finish<class_Thread_method_wait_to_finish>` can be called without blocking the calling thread.
|
||||
Returns ``true`` if this **Thread** is currently running the provided function. This is useful for determining if :ref:`wait_to_finish()<class_Thread_method_wait_to_finish>` can be called without blocking the calling thread.
|
||||
|
||||
To check if a **Thread** is joinable, use :ref:`is_started<class_Thread_method_is_started>`.
|
||||
To check if a **Thread** is joinable, use :ref:`is_started()<class_Thread_method_is_started>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -144,7 +144,7 @@ To check if a **Thread** is joinable, use :ref:`is_started<class_Thread_method_i
|
||||
|
||||
:ref:`bool<class_bool>` **is_started**\ (\ ) |const| :ref:`🔗<class_Thread_method_is_started>`
|
||||
|
||||
Returns ``true`` if this **Thread** has been started. Once started, this will return ``true`` until it is joined using :ref:`wait_to_finish<class_Thread_method_wait_to_finish>`. For checking if a **Thread** is still executing its task, use :ref:`is_alive<class_Thread_method_is_alive>`.
|
||||
Returns ``true`` if this **Thread** has been started. Once started, this will return ``true`` until it is joined using :ref:`wait_to_finish()<class_Thread_method_wait_to_finish>`. For checking if a **Thread** is still executing its task, use :ref:`is_alive()<class_Thread_method_is_alive>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -182,7 +182,7 @@ Because of that, there may be cases where the user may want to disable them (``e
|
||||
|
||||
Starts a new **Thread** that calls ``callable``.
|
||||
|
||||
If the method takes some arguments, you can pass them using :ref:`Callable.bind<class_Callable_method_bind>`.
|
||||
If the method takes some arguments, you can pass them using :ref:`Callable.bind()<class_Callable_method_bind>`.
|
||||
|
||||
The ``priority`` of the **Thread** can be changed by passing a value from the :ref:`Priority<enum_Thread_Priority>` enum.
|
||||
|
||||
@@ -198,11 +198,11 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or :r
|
||||
|
||||
:ref:`Variant<class_Variant>` **wait_to_finish**\ (\ ) :ref:`🔗<class_Thread_method_wait_to_finish>`
|
||||
|
||||
Joins the **Thread** and waits for it to finish. Returns the output of the :ref:`Callable<class_Callable>` passed to :ref:`start<class_Thread_method_start>`.
|
||||
Joins the **Thread** and waits for it to finish. Returns the output of the :ref:`Callable<class_Callable>` passed to :ref:`start()<class_Thread_method_start>`.
|
||||
|
||||
Should either be used when you want to retrieve the value returned from the method called by the **Thread** or before freeing the instance that contains the **Thread**.
|
||||
|
||||
To determine if this can be called without blocking the calling thread, check if :ref:`is_alive<class_Thread_method_is_alive>` is ``false``.
|
||||
To determine if this can be called without blocking the calling thread, check if :ref:`is_alive()<class_Thread_method_is_alive>` is ``false``.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
|
||||
Reference in New Issue
Block a user