Class: Hakuban::ThreadObjectManager
Instance Attribute Summary
#contract
Instance Method Summary
collapse
#drop, #drop_nonblock, #initialize, #object, #objects
Instance Method Details
#async_filter_out_stop_exception ⇒ Object
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_run ⇒ Object
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
|