File: failsafe_thread.rb

package info (click to toggle)
ruby-spring 2.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 428 kB
  • sloc: ruby: 3,373; sh: 9; makefile: 7
file content (14 lines) | stat: -rw-r--r-- 174 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'thread'

module Spring
  class << self
    def failsafe_thread
      Thread.new {
        begin
          yield
        rescue
        end
      }
    end
  end
end