summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorLuke Gruber <luke.gruber@shopify.com>2025-11-10 20:33:07 -0500
committerGitHub <noreply@github.com>2025-11-10 20:33:07 -0500
commit16c6f36039b14c983125db8144d791714035737b (patch)
tree0ed7cae3ecf939f049b56519cb22e29feb3bf15d /thread.c
parentd2c30a3bae908772c1de453aad8686000f6a5096 (diff)
[DOC] Clarify `Thread#kill` documentation. (#15132)
Mention that it is asynchronous and that the killed thread can still run a small amount of ruby code before exiting.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 0419fdf054..5d75bf4122 100644
--- a/thread.c
+++ b/thread.c
@@ -2935,7 +2935,10 @@ thread_raise_m(int argc, VALUE *argv, VALUE self)
*
* Terminates +thr+ and schedules another thread to be run, returning
* the terminated Thread. If this is the main thread, or the last
- * thread, exits the process.
+ * thread, exits the process. Note that the caller does not wait for
+ * the thread to terminate if the receiver is different from the currently
+ * running thread. The termination is asynchronous, and the thread can still
+ * run a small amount of ruby code before exiting.
*/
VALUE