Github user alopresto commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/387#discussion_r63269277
  
    --- Diff: 
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/AbstractScriptProcessor.java
 ---
    @@ -248,11 +253,13 @@ protected void setupEngine() {
                     
Thread.currentThread().setContextClassLoader(scriptEngineModuleClassLoader);
                 }
     
    -            scriptEngine = createScriptEngine();
    +            ScriptEngine scriptEngine = createScriptEngine();
    --- End diff --
    
    Obviously you moved the declaration to be locally scoped because you 
intended to add a for loop here. But as of right now, it only populates the 
queue with a single engine instance, so despite having multiple threads consume 
and re-populate it, the queue will only ever contain 1 or 0 engines for use. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to