Class: Hakuban::ThreadObjectManager

Inherits:
ObjectManager show all
Defined in:
lib/hakuban/thread.rb

Instance Attribute Summary

Attributes inherited from ObjectManager

#contract

Instance Method Summary collapse

Methods inherited from ObjectManager

#drop, #drop_nonblock, #initialize, #object, #objects

Constructor Details

This class inherits a constructor from Hakuban::ObjectManager

Instance Method Details

#async_filter_out_stop_exceptionObject



20
21
22
# File 'lib/hakuban/thread.rb', line 20

def async_filter_out_stop_exception
	yield
end

#async_join(thread) ⇒ Object



12
13
14
# File 'lib/hakuban/thread.rb', line 12

def async_join(thread)
	thread.value
end

#async_runObject



8
9
10
# File 'lib/hakuban/thread.rb', line 8

def async_run
	Thread.new { yield }
end

#async_stop(thread) ⇒ Object



16
17
18
# File 'lib/hakuban/thread.rb', line 16

def async_stop(thread)
	thread.kill
end