Skip to content

Commit 685a2be

Browse files
committed
100% documentation coverage.
1 parent c67377c commit 685a2be

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

lib/io/event/selector/select.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ def blocking(&block)
395395
end
396396
end
397397

398+
# Wait for a process to change state.
399+
#
400+
# @parameter fiber [Fiber] The fiber to resume after waiting.
401+
# @parameter pid [Integer] The process ID to wait for.
402+
# @parameter flags [Integer] Flags to pass to Process::Status.wait.
403+
# @returns [Process::Status] The status of the waited process.
398404
def process_wait(fiber, pid, flags)
399405
Thread.new do
400406
Process::Status.wait(pid, flags)
@@ -414,6 +420,10 @@ def process_wait(fiber, pid, flags)
414420
end
415421
end
416422

423+
# Wait for IO events or a timeout.
424+
#
425+
# @parameter duration [Numeric | Nil] The maximum time to wait, or nil for no timeout.
426+
# @returns [Integer] The number of ready IO objects.
417427
def select(duration = nil)
418428
if pop_ready
419429
# If we have popped items from the ready list, they may influence the duration calculation, so we don't delay the event loop:

0 commit comments

Comments
 (0)