Sha256: fb506864b5ea4446ea73d52877c5c635e10c7edbe0ddb0bd42f8719fbe107b3c
Contents?: true
Size: 470 Bytes
Versions: 17
Compression:
Stored size: 470 Bytes
Contents
require 'bundler/setup' require 'forking' root = File.expand_path(File.dirname(__FILE__)) f = Forking.new(:name => 'forking', :working_dir => root, :log_file => "#{root}/forking.log", :pid_file => "#{root}/forking.pid", :sync_log => true) 3.times do |i| f.spawn(:log_file => "#{root}/child#{i}.log", :sync_log => true) do $0 = "forking child" loop do p "#{Time.now} - #{Time.now.to_f} - #{i} - tick" sleep 0.1 end end end f.run!
Version data entries
17 entries across 11 versions & 2 rubygems