diff options
author | Isaac Clerencia <isaac.clerencia@gmail.com> | 2023-03-05 18:17:31 -0500 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-13 14:41:26 +0100 |
commit | acdb1bdbd7aed6442e840074b3a5c09202be6660 (patch) | |
tree | bb5b2555ddac78707cabc9268414e7bbbb3ee7f4 /doc | |
parent | 9e6f0ee9c794a78557d49a2b7cdb43d4ac045c6d (diff) |
Clarify Thread documentation
The current documentation uses the term "running" for two different things.
In the description of get_id() it claims "it will return empty string if the thread is not running", but it actually will return the thread id until wait_to_finish is called.
In the description of is_alive() it claims "it will return true if the thread is running", but in this case it means "the provided function hasn't finished running yet".
Updated the functions documentation slighly to make this clear.
(cherry picked from commit 2a4f38d54fbe8f6a35f5704fa9268e7f2d60b222)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Thread.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index 846dae0bae..d2304e0046 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -16,13 +16,13 @@ <method name="get_id" qualifiers="const"> <return type="String" /> <description> - Returns the current [Thread]'s ID, uniquely identifying it among all threads. If the [Thread] is not running 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 [method wait_to_finish] has been called, this returns an empty string. </description> </method> <method name="is_alive" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if this [Thread] is currently running. This is useful for determining if [method wait_to_finish] can be called without blocking the calling thread. + Returns [code]true[/code] if this [Thread] is currently running the provided function. This is useful for determining if [method wait_to_finish] can be called without blocking the calling thread. To check if a [Thread] is joinable, use [method is_started]. </description> </method> |