Class: Root::Processes
Instance Method Summary collapse
-
#initialize ⇒ Processes
constructor
A new instance of Processes.
- #join ⇒ Object
- #launch ⇒ Object
Methods inherited from Array
Constructor Details
#initialize ⇒ Processes
Returns a new instance of Processes.
24 25 |
# File 'lib/sub/root.rb', line 24 def initialize end |
Instance Method Details
#join ⇒ Object
34 35 36 37 38 |
# File 'lib/sub/root.rb', line 34 def join self.each do |pid| Process.waitpid(pid, 0) end end |
#launch ⇒ Object
27 28 29 30 31 32 |
# File 'lib/sub/root.rb', line 27 def launch pid = fork do yield end self << pid end |