fix for workflow processor (cause: latest redesign for less threads)

pull/1/head
orbiter 12 years ago
parent 77faeada4d
commit aeff31cd44

@ -177,13 +177,13 @@ public class WorkflowProcessor<J extends WorkflowJob> {
// execute concurrent in thread // execute concurrent in thread
while (this.input != null) { while (this.input != null) {
try { try {
this.input.put(in);
if (this.input.size() > this.executorRunning.get() && this.executorRunning.get() < this.maxpoolsize) synchronized (executor) { if (this.input.size() > this.executorRunning.get() && this.executorRunning.get() < this.maxpoolsize) synchronized (executor) {
if (this.input.size() > this.executorRunning.get() && this.executorRunning.get() < this.maxpoolsize) { if (this.input.size() > this.executorRunning.get() && this.executorRunning.get() < this.maxpoolsize) {
this.executorRunning.incrementAndGet(); this.executorRunning.incrementAndGet();
this.executor.submit(new InstantBlockingThread<J>(this)); this.executor.submit(new InstantBlockingThread<J>(this));
} }
} }
this.input.put(in);
break; break;
} catch (final Throwable e) { } catch (final Throwable e) {
try {Thread.sleep(10);} catch (final InterruptedException ee) {} try {Thread.sleep(10);} catch (final InterruptedException ee) {}

Loading…
Cancel
Save