You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2022/09/06 16:57:43 UTC

[GitHub] [openwhisk-runtime-java] bdoyle0182 commented on a diff in pull request #130: Support action-level concurrency in Java runtime.

bdoyle0182 commented on code in PR #130:
URL: https://github.com/apache/openwhisk-runtime-java/pull/130#discussion_r963958697


##########
core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/Proxy.java:
##########
@@ -48,7 +51,20 @@ public Proxy(int port) throws IOException {
 
         this.server.createContext("/init", new InitHandler());
         this.server.createContext("/run", new RunHandler());
-        this.server.setExecutor(null); // creates a default executor
+
+        if (Boolean.parseBoolean(System.getenv("__OW_ALLOW_CONCURRENT"))) {
+            ThreadPoolExecutor executor = new ThreadPoolExecutor(
+                    10,                  // Core size.

Review Comment:
   I'm not sure how we should optimally determine this number since every function will have a different concurrency setting. Should it err on the side of maximizing low concurrency, i.e. most functions probably won't increase their setting past 1.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org