@Override public void produce(ClassInference inference) { if (localTodo_.isActivated() && inference.getDestination() == localTodo_.getActiveRoot()) { localTodo_.add(inference); } else { mainWriter.produce(inference); } }
/** * Process all pending {@link ClassInference}s of the given {@link Context} * * @param context * the active {@link Context} with unprocessed * {@link ClassInference}s */ void process(Context context) { activeContext_.set(context); // at this point workerLocalTodo_ must be empty workerLocalTodo_.setActiveRoot(context.getRoot()); for (;;) { ClassInference inference = workerLocalTodo_.poll(); if (inference == null) { inference = context.takeToDo(); if (inference == null) return; } LOGGER_.trace("{}: processing inference {}", context, inference); inference.accept(inferenceProcessor_); } }
@Override public void process() throws InterruptedException { try { for (;;) { if (isInterrupted()) { LOGGER_.trace("Rule application interrupted"); break; } Context nextContext = getNextActiveContext(); if (nextContext == null) { break; } process(nextContext); } } finally { workerLocalTodo_.deactivate(); } }
/** * Process all pending {@link ClassInference}s of the given {@link Context} * * @param context * the active {@link Context} with unprocessed * {@link ClassInference}s */ void process(Context context) { activeContext_.set(context); // at this point workerLocalTodo_ must be empty workerLocalTodo_.setActiveRoot(context.getRoot()); for (;;) { ClassInference inference = workerLocalTodo_.poll(); if (inference == null) { inference = context.takeToDo(); if (inference == null) return; } LOGGER_.trace("{}: processing inference {}", context, inference); inference.accept(inferenceProcessor_); } }
@Override public void process() throws InterruptedException { try { for (;;) { if (isInterrupted()) { LOGGER_.trace("Rule application interrupted"); break; } Context nextContext = getNextActiveContext(); if (nextContext == null) { break; } process(nextContext); } } finally { workerLocalTodo_.deactivate(); } }
@Override public void produce(ClassInference inference) { if (localTodo_.isActivated() && inference.getDestination() == localTodo_.getActiveRoot()) { localTodo_.add(inference); } else { mainWriter.produce(inference); } }
/** * Process all pending {@link ClassInference}s of the given {@link Context} * * @param context * the active {@link Context} with unprocessed * {@link ClassInference}s */ void process(Context context) { activeContext_.set(context); // at this point workerLocalTodo_ must be empty workerLocalTodo_.setActiveRoot(context.getRoot()); for (;;) { ClassInference inference = workerLocalTodo_.poll(); if (inference == null) { inference = context.takeToDo(); if (inference == null) return; } LOGGER_.trace("{}: processing inference {}", context, inference); inference.accept(inferenceProcessor_); } }
@Override public void process() throws InterruptedException { try { for (;;) { if (isInterrupted()) { LOGGER_.trace("Rule application interrupted"); break; } Context nextContext = getNextActiveContext(); if (nextContext == null) { break; } process(nextContext); } } finally { workerLocalTodo_.deactivate(); } }
@Override public void produce(ClassInference inference) { if (localTodo_.isActivated() && inference.getDestination() == localTodo_.getActiveRoot()) { localTodo_.add(inference); } else { mainWriter.produce(inference); } }