Method: Thread.exit
- Defined in:
- thread.c
.exit ⇒ Object
Terminates the currently running thread and schedules another thread to be run.
If this thread is already marked to be killed, ::exit returns the Thread.
If this is the main thread, or the last thread, exit the process.
2737 2738 2739 2740 2741 2742 |
# File 'thread.c', line 2737
static VALUE
rb_thread_exit(VALUE _)
{
rb_thread_t *th = GET_THREAD();
return rb_thread_kill(th->self);
}
|