Class: GrubY::Async

Inherits:
Object
  • Object
show all
Defined in:
lib/gruubY/async.rb

Class Method Summary collapse

Class Method Details

.run(&block) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/gruubY/async.rb', line 3

def self.run(&block)
  Thread.new do
    begin
      block.call
    rescue => e
      puts "[ERROR] #{e}"
    end
  end
end