本文簡要介紹ruby語言中 Fiber::SchedulerInterface.process_wait
的用法。
用法
process_wait(pid, flags)
由 Process::Status.wait
調用以等待指定進程。有關參數說明,請參見該方法說明。
建議的最小實現:
Thread.new do
Process::Status.wait(pid, flags)
end.value
這個鉤子是可選的:如果它不存在於當前調度器中, Process::Status.wait
將表現為一個阻塞方法。
預計會返回 Process::Status
實例。
相關用法
- Ruby SchedulerInterface.fiber用法及代碼示例
- Ruby Symbol capitalize用法及代碼示例
- Ruby SizedQueue clear()用法及代碼示例
- Ruby Spotter.spot_op_asgn2_for_name用法及代碼示例
- Ruby StringScanner skip_until用法及代碼示例
- Ruby StringScanner search_full用法及代碼示例
- Ruby String.match?用法及代碼示例
- Ruby StringScanner.beginning_of_line?用法及代碼示例
- Ruby Stat.stat <=>用法及代碼示例
- Ruby Symbol.to_proc用法及代碼示例
- Ruby Symbol.end_with?用法及代碼示例
- Ruby StringScanner restsize用法及代碼示例
- Ruby Spotter.spot_opcall_for_name用法及代碼示例
- Ruby Set flatten()用法及代碼示例
- Ruby SpecificationProvider.requirement_satisfied_by?用法及代碼示例
- Ruby Set.replace用法及代碼示例
- Ruby String delete!用法及代碼示例
- Ruby String chop!用法及代碼示例
- Ruby SizedQueue push()用法及代碼示例
- Ruby Specification.file_name用法及代碼示例
- Ruby SimpleDelegator.__setobj__用法及代碼示例
- Ruby String.unpack用法及代碼示例
- Ruby Stat.world_writable?用法及代碼示例
- Ruby String each_line用法及代碼示例
- Ruby StringScanner.pos=用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 SchedulerInterface.process_wait。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。