From 80335a49513f3e74228aa1bfb998dd54855f68e2 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 23 Apr 2021 17:15:25 +0200 Subject: simulator: Introduce SimResourceScheduler This change introduces the SimResourceScheduler interface, which is a generic interface for scheduling the coordination and synchronization between resource providers and resource consumers. This interface replaces the need for users to manually specify the clock and coroutine context per resource provider. --- .../src/main/kotlin/org/opendc/compute/simulator/SimHost.kt | 1 + 1 file changed, 1 insertion(+) (limited to 'opendc-compute') diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt index 6d87e444..68667a8c 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt @@ -105,6 +105,7 @@ public class SimHost( * The hypervisor to run multiple workloads. */ public val hypervisor: SimHypervisor = hypervisor.create( + scope.coroutineContext, clock, object : SimHypervisor.Listener { override fun onSliceFinish( hypervisor: SimHypervisor, -- cgit v1.2.3