From 203dd5dc4815aa59977b3f932f80cb37be006bfb Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 6 May 2022 11:33:32 +0200 Subject: 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. --- .../src/main/kotlin/org/opendc/faas/service/FunctionObject.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'opendc-faas/opendc-faas-service/src') 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() } -- cgit v1.2.3