/** * Convenience method around {@link #cancel(CauseOfInterruption...)} in case * the cause is a random exception. */ public boolean cancel(Throwable t) { return cancel(new ExceptionCause(t)); }
/** * Convenience method around {@link #cancel(CauseOfInterruption...)} in case * the cause is a random exception. */ public boolean cancel(Throwable t) { return cancel(new ExceptionCause(t)); }
/** * If the computation is going synchronously, try to cancel that. */ @Override public void stop(Throwable cause) throws Exception { Thread e = executing; // capture if (e!=null) { if (e instanceof Executor) { ((Executor) e).interrupt(ABORTED, new ExceptionCause(cause)); } else { e.interrupt(); } } } }
/** * If the computation is going synchronously, try to cancel that. */ @Override public void stop(Throwable cause) throws Exception { Thread e = executing; // capture if (e!=null) { if (e instanceof Executor) { ((Executor) e).interrupt(ABORTED, new ExceptionCause(cause)); } else { e.interrupt(); } } } }
/** * If the computation is going synchronously, try to cancel that. */ @Override public void stop(Throwable cause) throws Exception { Thread e = executing; // capture if (e!=null) { if (e instanceof Executor) { ((Executor) e).interrupt(ABORTED, new ExceptionCause(cause)); } else { e.interrupt(); } } } }
/** * If the computation is going synchronously, try to cancel that. */ @Override public void stop(Throwable cause) throws Exception { Thread e = executing; // capture if (e!=null) { if (e instanceof Executor) { ((Executor) e).interrupt(ABORTED, new ExceptionCause(cause)); } else { e.interrupt(); } } } }