stop?()
Returns true if thr is dead or sleeping.
a = Thread.new { Thread.stop } b = Thread.current a.stop? #=> true b.stop? #=> false
See also #alive? and #status.
static VALUE rb_thread_stop_p(VALUE thread) { rb_thread_t *th; GetThreadPtr(thread, th); if (rb_threadptr_dead(th)) return Qtrue; if (th->status == THREAD_STOPPED || th->status == THREAD_STOPPED_FOREVER) return Qtrue; return Qfalse; }