Skip to content

Instantly share code, notes, and snippets.

@clicube
Created February 27, 2013 03:55
Show Gist options
  • Save clicube/5044923 to your computer and use it in GitHub Desktop.
Save clicube/5044923 to your computer and use it in GitHub Desktop.
class Thread
def self.try_handle_interrupt *args
if respond_to?(:handle_interrupt)
self.handle_interrupt(*args){ yield }
else
yield
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment