Sha256: 0fb2a77d23995029c1760edbe1d41b81763bdc1657698a4e3688d87e4e002a0d

Contents?: true

Size: 341 Bytes

Versions: 8

Compression:

Stored size: 341 Bytes

Contents

#!/usr/bin/env ruby

require 'async/container/forked'

container = Async::Container::Forked.new

puts "Controller process: #{Process.pid}"

container.run(processes: 8, restart: true) do
	puts "Starting process: #{Process.pid}"
	
	while true
		sleep 1
	end
ensure
	puts "Exiting: #{$!}"
end

container.wait

puts "Controller procss exiting!"

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
async-container-0.14.1 examples/container.rb
async-container-0.14.0 examples/container.rb
async-container-0.13.0 examples/container.rb
async-container-0.12.0 examples/container.rb
async-container-0.11.0 examples/container.rb
async-container-0.10.2 examples/container.rb
async-container-0.10.1 examples/container.rb
async-container-0.10.0 examples/container.rb