Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Fiber::Scheduler#process_wait
process_wait(pid, flags)
scheduler.c
View on GitHub ↗
VALUE
rb_fiber_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags)
{
VALUE arguments[] = {
PIDT2NUM(pid), RB_INT2NUM(flags)
};
return rb_check_funcall(scheduler, id_process_wait, 2, arguments);
}
Invoked by Process::Status.wait in order to wait for a specified process. See that method description for arguments description.
Suggested minimal implementation:
Example
Thread.new do Process::Status.wait(pid, flags) end.value
This hook is optional: if it is not present in the current scheduler, Process::Status.wait will behave as a blocking method.
Expected to return a Process::Status instance.