public V call() throws Exception { try { threadState.bind(); return doCall(this.callable); } finally { threadState.restore(); } }
/** * {@link ThreadState#bind Bind}s the Subject thread state, executes the target {@code Runnable} and then guarantees * the previous thread state's {@link ThreadState#restore restoration}: * <pre> * try { * threadState.{@link ThreadState#bind bind()}; * {@link #doRun doRun}(targetRunnable); * } finally { * threadState.{@link ThreadState#restore restore()} * } * </pre> */ public void run() { try { threadState.bind(); doRun(this.runnable); } finally { threadState.restore(); } }
public V call() throws Exception { try { threadState.bind(); return doCall(this.callable); } finally { threadState.restore(); } }
/** * {@link ThreadState#bind Bind}s the Subject thread state, executes the target {@code Runnable} and then guarantees * the previous thread state's {@link ThreadState#restore restoration}: * <pre> * try { * threadState.{@link ThreadState#bind bind()}; * {@link #doRun doRun}(targetRunnable); * } finally { * threadState.{@link ThreadState#restore restore()} * } * </pre> */ public void run() { try { threadState.bind(); doRun(this.runnable); } finally { threadState.restore(); } }
public V call() throws Exception { try { threadState.bind(); return doCall(this.callable); } finally { threadState.restore(); } }
/** * {@link ThreadState#bind Bind}s the Subject thread state, executes the target {@code Runnable} and then guarantees * the previous thread state's {@link ThreadState#restore restoration}: * <pre> * try { * threadState.{@link ThreadState#bind bind()}; * {@link #doRun doRun}(targetRunnable); * } finally { * threadState.{@link ThreadState#restore restore()} * } * </pre> */ public void run() { try { threadState.bind(); doRun(this.runnable); } finally { threadState.restore(); } }