Module: Kernel

Defined in:
lib/hive/worker.rb

Instance Method Summary collapse

Instance Method Details

#safe_trap(*signals) ⇒ Object



2
3
4
5
# File 'lib/hive/worker.rb', line 2

def safe_trap(*signals)
  signals.each { |s| trap(s) { yield } }
  Thread.new { loop { sleep 1 } } if RUBY_PLATFORM =~ /mswin32/
end