Last active
May 13, 2016 12:10
-
-
Save asutoshpalai/77158f5318f89a14fac652fa96cb3723 to your computer and use it in GitHub Desktop.
Example to reproduce rubygems/bundler#4568 issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# forzen_string_literal: true | |
def run | |
thread = Thread.new do | |
puts "Running..." | |
nil while true | |
end | |
begin | |
thread.run.join | |
rescue Interrupt | |
end | |
end | |
puts "Starting..." | |
run | |
puts "Shutting down gracefully" | |
# Gracefull shutdown code here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment