private void signalMore() { if (!done.get()) { synchronized (workItem) { if (workItem.getThreadState() != ThreadState.MORE_WORK) { workItem.moreWork(); } } } }
private void signalMore() { if (!done.get()) { synchronized (workItem) { if (workItem.getThreadState() != ThreadState.MORE_WORK) { workItem.moreWork(); } } } }
private void signalMore() { if (!done.get()) { synchronized (workItem) { if (workItem.getThreadState() != ThreadState.MORE_WORK) { workItem.moreWork(); } } } }
/** * Special call from request threads to allow resumption of processing by * the calling thread. */ public void doMoreWork() { boolean run = false; synchronized (this) { moreWork(); if (!useCallingThread || this.getThreadState() != ThreadState.MORE_WORK) { return; } run = !hasThread; } if (run) { //run outside of the lock LogManager.logDetail(LogConstants.CTX_DQP, "Restarting processing using the calling thread", requestID); //$NON-NLS-1$ run(); } }
/** * Special call from request threads to allow resumption of processing by * the calling thread. */ public void doMoreWork() { boolean run = false; synchronized (this) { moreWork(); if (!useCallingThread || this.getThreadState() != ThreadState.MORE_WORK) { return; } run = !hasThread; } if (run) { //run outside of the lock LogManager.logDetail(LogConstants.CTX_DQP, "Restarting processing using the calling thread", requestID); //$NON-NLS-1$ run(); } }
/** * Special call from request threads to allow resumption of processing by * the calling thread. */ public void doMoreWork() { boolean run = false; synchronized (this) { moreWork(); if (!useCallingThread || this.getThreadState() != ThreadState.MORE_WORK) { return; } run = !hasThread; } if (run) { //run outside of the lock LogManager.logDetail(LogConstants.CTX_DQP, "Restarting processing using the calling thread", requestID); //$NON-NLS-1$ run(); } }
break; //allow results to be processed by calling thread if (this.getThreadState() == ThreadState.MORE_WORK) { continue;
break; //allow results to be processed by calling thread if (this.getThreadState() == ThreadState.MORE_WORK) { continue;
break; //allow results to be processed by calling thread if (this.getThreadState() == ThreadState.MORE_WORK) { continue;
moreWorkTask = null; if (getThreadState() != ThreadState.MORE_WORK) {
moreWorkTask = null; if (getThreadState() != ThreadState.MORE_WORK) {
moreWorkTask = null; if (getThreadState() != ThreadState.MORE_WORK) {
req.setStartTime(holder.getProcessingTimestamp()); req.setState(holder.isCanceled()?ProcessingState.CANCELED:(holder.isDoneProcessing() || holder.isCloseRequested())?ProcessingState.DONE:ProcessingState.PROCESSING); switch (holder.getThreadState()) { case DONE: case IDLE:
req.setStartTime(holder.getProcessingTimestamp()); req.setState(holder.isCanceled()?ProcessingState.CANCELED:(holder.isDoneProcessing() || holder.isCloseRequested())?ProcessingState.DONE:ProcessingState.PROCESSING); switch (holder.getThreadState()) { case DONE: case IDLE:
assertEquals(rowsPerBatch, rm.getResultsList().size()); for (int i = 0; i < 10 && item.getThreadState() != ThreadState.IDLE; i++) { Thread.sleep(100); assertEquals(ThreadState.IDLE, item.getThreadState()); assertTrue(item.resultsBuffer.getManagedRowCount() <= rowsPerBatch*23); assertEquals(rowsPerBatch, rm.getResultsList().size()); for (int i = 0; i < 50 && item.getThreadState() != ThreadState.IDLE; i++) { Thread.sleep(100); assertEquals(ThreadState.IDLE, item.getThreadState());
req.setStartTime(holder.getProcessingTimestamp()); req.setState(holder.isCanceled()?ProcessingState.CANCELED:(holder.isDoneProcessing() || holder.isCloseRequested())?ProcessingState.DONE:ProcessingState.PROCESSING); switch (holder.getThreadState()) { case DONE: case IDLE: