/** * Calling this method will set the stop flag and wait until the thread is * stopped. * * @return the result, or null * @throws RuntimeException if an exception in the method call occurs */ public Object get() { Exception e = getException(); if (e != null) { throw new RuntimeException(e); } return result; }