Sha256: d2083b3f8e15d6a69816c2cadf40bbfc632053efc0bd5261e2b012179914fe03

Contents?: true

Size: 696 Bytes

Versions: 3

Compression:

Stored size: 696 Bytes

Contents

##########################################################################
# example_fork_wait.rb
#
# Generic test script for futzing around with the block form of
# fork/wait. You can run this example via the 'example:fork_wait' task.
##########################################################################
require 'win32/process'

puts "VERSION: " + Process::WIN32_PROCESS_VERSION

# In the child, using block form
fork{
  7.times { |i|
    puts "Child: #{i}"
    sleep 1
  }
}

# Back in the parent
4.times{ |i|
  puts "Parent: #{i}"
  sleep 1
}

# Wait for the children
Process.wait

# Children should be done here before continuing on
puts "Continuing on..."

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
win32-process-0.6.6 examples/example_fork_wait.rb
win32-process-0.6.5 examples/example_fork_wait.rb
win32-process-0.6.4 examples/example_fork_wait.rb