diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-03-23 17:07:31 +0100 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-03-23 17:07:31 +0100 |
| commit | 0ad600eb8e14c0ef3ba5529c59d300dc20c85ab2 (patch) | |
| tree | 6b8ae0a7bbbdfae8cef22561effc3b29b78e4e7a /simulator/opendc-simulator/opendc-simulator-compute/src | |
| parent | 16178eb0499ad398f14bd209e9c1a6e5b52850a9 (diff) | |
simulator: Add support for transforming resource consumers
This change adds support for transforming the resource commands emitted
by the resource consumers. The SimResourceForwarder is modified to also
support transforming the resource commands.
Diffstat (limited to 'simulator/opendc-simulator/opendc-simulator-compute/src')
| -rw-r--r-- | simulator/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractHypervisor.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/simulator/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractHypervisor.kt b/simulator/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractHypervisor.kt index 81d09f12..8046dd53 100644 --- a/simulator/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractHypervisor.kt +++ b/simulator/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractHypervisor.kt @@ -142,11 +142,11 @@ public abstract class SimAbstractHypervisor : SimHypervisor { */ override fun close() { if (!isTerminated) { + isTerminated = true + cpus.forEach { (_, provider) -> provider.close() } _vms.remove(this) } - - isTerminated = true } } |
