Sha256: 943732c72cfc0511b8d793ecdcec318f522cb08b7f94b52724e336a27bacb455

Contents?: true

Size: 259 Bytes

Versions: 6

Compression:

Stored size: 259 Bytes

Contents

require File.expand_path('spec/spec_helper')

method = case ARGV[0]
when "PROCESS" then :in_processes
when "THREAD" then :in_threads
else raise "Learn to use this!"
end

Parallel.send(method, 2) do
  sleep 10
  puts "I should have been killed earlier..."
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
parallel-0.8.3 spec/cases/parallel_start_and_kill.rb
parallel-0.8.2 spec/cases/parallel_start_and_kill.rb
parallel-0.8.1 spec/cases/parallel_start_and_kill.rb
parallel-0.8.0 spec/cases/parallel_start_and_kill.rb
parallel-0.7.1 spec/cases/parallel_start_and_kill.rb
parallel-0.7.0 spec/cases/parallel_start_and_kill.rb