From acdb1bdbd7aed6442e840074b3a5c09202be6660 Mon Sep 17 00:00:00 2001 From: Isaac Clerencia Date: Sun, 5 Mar 2023 18:17:31 -0500 Subject: 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) --- doc/classes/Thread.xml | 4 ++-- 1 file 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 @@ - 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. - 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]. -- cgit v1.2.3