terminate()
public
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.
Show source
/*
* call-seq:
* thr.exit => thr
* thr.kill => thr
* thr.terminate => thr
*
* Terminates <i>thr</i> and schedules another thread to be run, returning
* the terminated <code>Thread</code>. If this is the main thread, or the
* last thread, exits the process.
*/
VALUE
rb_thread_kill(thread)
VALUE thread;
{
rb_thread_t th = rb_thread_check(thread);
rb_kill_thread(th, 0);
return thread;
}