chetanmeh commented on a change in pull request #2795: enable concurrent 
activation processing
URL: 
https://github.com/apache/incubator-openwhisk/pull/2795#discussion_r225481350
 
 

 ##########
 File path: 
core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala
 ##########
 @@ -348,13 +386,21 @@ class ContainerProxy(
 
     // Only initialize iff we haven't yet warmed the container
     val initialize = stateData match {
-      case data: WarmedData => Future.successful(None)
-      case _                => 
container.initialize(job.action.containerInitializer, 
actionTimeout).map(Some(_))
+      case data: WarmedData =>
+        Future.successful(None)
+      case _ =>
+        container
+          .initialize(job.action.containerInitializer, actionTimeout, 
job.action.limits.concurrency.maxConcurrent)
+          .map(Some(_))
     }
 
     val activation: Future[WhiskActivation] = initialize
       .flatMap { initInterval =>
-        val parameters = job.msg.content getOrElse JsObject.empty
+        //immediately setup warmedData for use (before first execution) so 
that concurrent actions can use it asap
+        if (!initInterval.isEmpty) {
 
 Review comment:
   Use `initInterval.isDefined`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to