aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index e92208eedc..1d8ea96e03 100644
--- a/thread.c
+++ b/thread.c
@@ -2229,6 +2229,18 @@ rb_thread_kill(VALUE thread)
return thread;
}
+int
+rb_thread_to_be_killed(VALUE thread)
+{
+ rb_thread_t *th;
+
+ GetThreadPtr(thread, th);
+
+ if (th->to_kill || th->status == THREAD_KILLED) {
+ return TRUE;
+ }
+ return FALSE;
+}
/*
* call-seq: