/** Evaluates given task directly. */ final void doEvaluate (Task t, Object processorLock, RequestProcessor src) { Task previous = todo; boolean interrupted = Thread.interrupted(); try { todo = t; t.run (); } finally { synchronized (processorLock) { todo = previous; if (interrupted || todo.item == null) { if (src.interruptThread) { // reinterrupt the thread if it was interrupted and // we support interrupts Thread.currentThread().interrupt(); } } } } }
/** Evaluates given task directly. */ final void doEvaluate (Task t, Object processorLock, RequestProcessor src) { Task previous = todo; boolean interrupted = Thread.interrupted(); try { todo = t; t.run (); } finally { synchronized (processorLock) { todo = previous; if (interrupted || todo.item == null) { if (src.interruptThread) { // reinterrupt the thread if it was interrupted and // we support interrupts Thread.currentThread().interrupt(); } } } } }
if (dd.getValue() == DialogDescriptor.OK_OPTION) { rootPath = new File(panel.tfRootPath.getText()); validateTask.run(); } else { rootPath = null;
try { if (loggable) logger ().log (" Executing " + todo); // NOI18N todo.run (); if (loggable) logger ().log (" Execution finished in" + getName ()); // NOI18N debug = todo.debug();
try { if (loggable) logger ().log (" Executing " + todo); // NOI18N todo.run (); if (loggable) logger ().log (" Execution finished in" + getName ()); // NOI18N debug = todo.debug();
run(); } else { // it is already running in other thread of this RP if (lastThread != Thread.currentThread()) {
run(); } else { // it is already running in other thread of this RP if (lastThread != Thread.currentThread()) {
/** Evaluates given task directly. */ final void doEvaluate (Task t, Object processorLock, RequestProcessor src) { Task previous = todo; boolean interrupted = Thread.interrupted(); try { todo = t; t.run (); } finally { synchronized (processorLock) { todo = previous; if (interrupted || todo.item == null) { if (src.interruptThread) { // reinterrupt the thread if it was interrupted and // we support interrupts Thread.currentThread().interrupt(); } } } } }