private void finishNewArcTokenProcessing( final GraphProcess process, final ArcToken arcToken, final boolean asynchronous) { fireEvent(ArcTokenEvent.newCreatedEvent(this, arcToken)); if (asynchronous && arcExecutionStarted) { asyncQueue.add(arcToken); } else { process.enqueueArcTokenForExecution(arcToken); } }
private void drainAsyncQueue(final GraphProcess process) { while (!asyncQueue.isEmpty()) { process.enqueueArcTokenForExecution(asyncQueue.remove(0)); } }