File: exit_in_process.rb

package info (click to toggle)
ruby-parallel 1.22.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 464 kB
  • sloc: ruby: 1,930; makefile: 4
file content (10 lines) | stat: -rw-r--r-- 208 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true
require './spec/cases/helper'

begin
  Parallel.map([1]) { exit } # rubocop:disable Lint/UnreachableLoop
rescue Parallel::DeadWorker
  puts "Yep, DEAD"
else
  puts "WHOOOPS"
end