Skip to main content

rb_thread_interrupted

Function rb_thread_interrupted 

Source
pub unsafe extern "C" fn rb_thread_interrupted(thval: VALUE) -> c_int
Expand description

Checks if the thread’s execution was recently interrupted. If called from that thread, this function can be used to detect spurious wake-ups.

@param[in] thval Thread in question. @retval 0 The thread was not interrupted. @retval otherwise The thread was interrupted recently.

@internal

§Above description is not a lie. But actually the return value is an opaque trap vector. If you know which bit means which, you can know what happened.

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.3.8