What about the following approach:
you take the list `_invokers` and drop the first `_invokerSlots.length` 
elements. Than you map through the invokers (you will have the memory 
available) and return a list of new Semaphores. Last, you add it to the current 
list of `_invokerSlots`.

```scala
_invokerSlots = _invokerSlots ++ _invokers.drop(_invokerSlots.length).map { i =>
  val userMemoryOfThisInvoker = i.id.userMemory
  ...
  new ForcibleSemaphore(calculatedMemory)
}
```

[ Full content available at: 
https://github.com/apache/incubator-openwhisk/pull/4011 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to