summaryrefslogtreecommitdiff
path: root/opendc-faas/opendc-faas-service/src
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-05-06 11:33:32 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-05-06 22:13:42 +0200
commit203dd5dc4815aa59977b3f932f80cb37be006bfb (patch)
tree5bc2997c8c24b6d548fab6786c65985845455c86 /opendc-faas/opendc-faas-service/src
parentc3d8d967f82f39f1ef461d5687eb68fb867336c5 (diff)
feat(faas): Add helper tools for FaaS simulations
This change adds a new module, opendc-faas-workload that contains helper code for constructing simulations of FaaS-based workloads using OpenDC. In addition, we add an integration test that demonstrates the capabilities of the helper tool and the FaaS platform of OpenDC.
Diffstat (limited to 'opendc-faas/opendc-faas-service/src')
-rw-r--r--opendc-faas/opendc-faas-service/src/main/kotlin/org/opendc/faas/service/FunctionObject.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/opendc-faas/opendc-faas-service/src/main/kotlin/org/opendc/faas/service/FunctionObject.kt b/opendc-faas/opendc-faas-service/src/main/kotlin/org/opendc/faas/service/FunctionObject.kt
index 1cc33f6f..d953f737 100644
--- a/opendc-faas/opendc-faas-service/src/main/kotlin/org/opendc/faas/service/FunctionObject.kt
+++ b/opendc-faas/opendc-faas-service/src/main/kotlin/org/opendc/faas/service/FunctionObject.kt
@@ -129,7 +129,8 @@ public class FunctionObject(
}
override fun close() {
- instances.forEach(FunctionInstance::close)
+ val copy = instances.toList() // Make copy to prevent concurrent modification
+ copy.forEach(FunctionInstance::close)
instances.clear()
}