ThreadBase.join

Throwable join(bool rethrow = true)

Waits for this thread to complete. If the thread terminated as the result of an unhandled exception, this exception will be rethrown.

Parameters

rethrowRethrow any unhandled exception which may have caused this thread to terminate.

Throws

ThreadException if the operation fails.

Any exception not handled by the joined thread.

Returns

Any exception not handled by this thread if rethrow = false, null

otherwise.