Sha256: fb685007b288af068ce0f235b0bfee5dec1426e1ead2dce67b4324ada1de32be
Contents?: true
Size: 403 Bytes
Versions: 20
Compression:
Stored size: 403 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 suspend end puts "got child pid #{pid}" puts 'parent waiting for child' Thread.current.backend.waitpid(pid) puts 'parent done waiting'
Version data entries
20 entries across 20 versions & 1 rubygems