Skip to content

Instantly share code, notes, and snippets.

@jah2488
Created January 26, 2015 22:14
Show Gist options
  • Select an option

  • Save jah2488/4b6ec200f59188a76cc8 to your computer and use it in GitHub Desktop.

Select an option

Save jah2488/4b6ec200f59188a76cc8 to your computer and use it in GitHub Desktop.
Signal.trap(:INFO) {
puts "chill, I'm processing #@current_number"
}
@current_number = 0
loop do
@current_number += 1
sleep 3
end
#while running...
# ^-T
# => chill, I'm processing 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment