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
Please login to continue.