summaryrefslogtreecommitdiff
path: root/doc/scheduler.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/scheduler.md')
-rw-r--r--doc/scheduler.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/scheduler.md b/doc/scheduler.md
index 9994831663..a6e2d78224 100644
--- a/doc/scheduler.md
+++ b/doc/scheduler.md
@@ -12,6 +12,17 @@ This is the interface you need to implement.
~~~ ruby
class Scheduler
+ # Wait for the specified process ID to exit.
+ # This hook is optional.
+ # @parameter pid [Integer] The process ID to wait for.
+ # @parameter flags [Integer] A bit-mask of flags suitable for `Process::Status.wait`.
+ # @returns [Process::Status] A process status instance.
+ def process_wait(pid, flags)
+ Thread.new do
+ Process::Status.wait(pid, flags)
+ end.value
+ end
+
# Wait for the given file descriptor to match the specified events within
# the specified timeout.
# @parameter event [Integer] A bit mask of `IO::READABLE`,