wakeup()
public
Marks thr as eligible for scheduling (it may still remain blocked
on I/O, however). Does not invoke the scheduler (see Thread#run).
c = Thread.new { Thread.stop; puts "hey!" }
c.wakeup
produces:
hey!
Show source
VALUE
rb_thread_wakeup(VALUE thread)
{
rb_thread_t *th;
GetThreadPtr(thread, th);
if (th->status == THREAD_KILLED) {
rb_raise(rb_eThreadError, "killed thread");
}
rb_thread_ready(th);
if (th->status != THREAD_TO_KILL) {
th->status = THREAD_RUNNABLE;
}
return thread;
}