Sha256: a64bf441cfb3c18c9ff01b23958e2067076dfba21d3ccb5b1211a7d99314fcda

Contents?: true

Size: 383 Bytes

Versions: 1

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

require 'bundler/setup'
require 'polyphony'

puts "parent pid: #{Process.pid}"

pid = Polyphony.fork do
  puts "child pid: #{Process.pid}"

  spin do
    puts 'child going to sleep 1...'
    sleep 1
    puts 'child woke up 1'
  end
end

puts "got child pid #{pid}"

puts 'parent waiting for child'
Gyro::Child.new(pid).await
puts 'parent done waiting'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
polyphony-0.23 examples/core/fork.rb