value

thr.value â obj
Instance Public methods

Waits for thr to complete, using join, and returns its value or raises the exception which terminated the thread.

a = Thread.new { 2 + 2 }
a.value   #=> 4

b = Thread.new { raise 'something went wrong' }
b.value   #=> RuntimeError: something went wrong
doc_ruby_on_rails
2015-05-17 14:46:16
Comments
Leave a Comment

Please login to continue.