Module: Kernel

Defined in:
lib/thread/promise.rb,
lib/thread/future.rb,
lib/thread/every.rb,
lib/thread/delay.rb

Instance Method Summary collapse

Instance Method Details

#delay(&block) ⇒ Object

Helper to create a Thread::Delay



91
92
93
# File 'lib/thread/delay.rb', line 91

def delay (&block)
	Thread::Delay.new(&block)
end

#every(every, &block) ⇒ Object

Helper to create an every



194
195
196
# File 'lib/thread/every.rb', line 194

def every (every, &block)
	Thread::Every.new(every, &block)
end

#future(pool = nil, &block) ⇒ Object

Helper to create a future.



155
156
157
# File 'lib/thread/future.rb', line 155

def future (pool = nil, &block)
	Thread::Future.new(pool, &block)
end

#promiseObject

Helper method to create a promise.



80
81
82
# File 'lib/thread/promise.rb', line 80

def promise
	Thread::Promise.new
end