public void executeNonBlocking(final Runnable task) throws RejectedExecutionException { delegate.execute(task); }
public void run() { executor.execute(task); }
public void execute(final Runnable task) { delegate.execute(task); }
public void execute(final Runnable command) { AccessController.doPrivileged((PrivilegedAction<Void>) () -> { delegate.execute(command); return null; }, context); }
public void execute(final Runnable command) { try { delegate.execute(command); } catch (Throwable t) { log.logf(level, t, "Exception thrown from thread task"); } }
public void execute(final Runnable command) { initializer.run(); delegate.execute(command); }
public void executeBlocking(final Runnable task) throws RejectedExecutionException, InterruptedException { try { delegate.execute(task); } catch (ExecutionInterruptedException e) { if (Thread.interrupted()) { throw new InterruptedException(); } else { throw e; } } } }
public void executeBlocking(final Runnable task, final long timeout, final TimeUnit unit) throws RejectedExecutionException, InterruptedException { try { delegate.execute(task); } catch (ExecutionInterruptedException e) { if (Thread.interrupted()) { throw new InterruptedException(); } else { throw e; } } }
public void run() { try { synchronized (lock) { int t = ++currentThreadCount; if (t > largestThreadCount) { largestThreadCount = t; } } taskExecutor.execute(task); synchronized (lock) { currentThreadCount--; } } finally { limitSemaphore.release(); } } });
public void run() { try { synchronized (lock) { int t = ++currentThreadCount; if (t > largestThreadCount) { largestThreadCount = t; } } taskExecutor.execute(task); synchronized (lock) { currentThreadCount--; } } finally { limitSemaphore.release(); } } });
public void run() { try { synchronized (lock) { int t = ++currentThreadCount; if (t > largestThreadCount) { largestThreadCount = t; } } taskExecutor.execute(task); synchronized (lock) { currentThreadCount--; } } finally { limitSemaphore.release(); } } });
public void run() { try { synchronized (lock) { int t = ++currentThreadCount; if (t > largestThreadCount) { largestThreadCount = t; } } taskExecutor.execute(task); synchronized (lock) { currentThreadCount--; } } finally { limitSemaphore.release(); } } });
public void execute(final Runnable command) { final Thread thr = Thread.currentThread(); final String oldName = thr.getName(); thr.setName(newName); try { delegate.execute(command); } finally { thr.setName(oldName); } }
public void execute(final Runnable command) { final Thread thr = Thread.currentThread(); ClassLoader old = thr.getContextClassLoader(); thr.setContextClassLoader(taskClassLoader); try { delegate.execute(command); } finally { thr.setContextClassLoader(old); } }
public void execute(final Runnable command) { final Thread thr = Thread.currentThread(); final String oldName; oldName = thr.getName(); thr.setName(oldName + " (" + notation + ')'); try { delegate.execute(command); } finally { thr.setName(oldName); } }
private void runTask(Runnable task) { if (task != null) try { taskExecutor.execute(task); } catch (Throwable t) { Messages.msg.executionFailed(t, task); } }
/** * Defer interrupts for the duration of some task. Once the task is complete, any deferred interrupt will be * delivered to the thread, thus the thread interrupt status should be checked upon return. If the current thread * is not a {@code JBossThread}, the task is simply run as-is. * * @param directExecutor the task executor to use * @param task the task to run */ public static void executeWithInterruptDeferred(final DirectExecutor directExecutor, final Runnable task) { final JBossThread thread = currentThread(); if (registerDeferral(thread)) try { directExecutor.execute(task); } finally { unregisterDeferral(thread); } else { // already deferred directExecutor.execute(task); } }
taskExecutor.execute(runnable); } catch (Throwable t) { Messages.msg.executionFailed(t, runnable);
public void execute(final Runnable command) { final JBossThread thr = JBossThread.currentThread(); final String oldName = thr.getName(); thr.setName(thr.getThreadNameInfo().format(thr, nameFormat)); try { delegate.execute(command); } finally { thr.setName(oldName); } }