From: "Iñaki Baz Castillo" Date: 2012-04-29T10:28:37+09:00 Subject: What is the meaning of rb_thread_interrupted() ? Hi, I'm coding a Ruby C extension and would like to know the meaning of rb_thread_interrupted() function defined in thread.c, whose content is: /* This function can be called in blocking region. */ int rb_thread_interrupted(VALUE thval) { rb_thread_t *th; GetThreadPtr(thval, th); return RUBY_VM_INTERRUPTED(th); } And RUBY_VM_INTERRUPTED(th) is defined as: #define RUBY_VM_INTERRUPTED(th) ((th)->interrupt_flag & 0x02) So, when does rb_thread_interrupted() return 1 or 0? Thanks a lot. -- Iñaki Baz Castillo