diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-02-14 00:44:43 +0100 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-02-14 00:44:43 +0100 |
| commit | d40eae0264236be3a9d34f39a63adde8a9b47a57 (patch) | |
| tree | c9bb0ecb689cfd023294031c6660779632b8139d /odcsim/odcsim-engine-omega/src | |
| parent | 38156d85cd72d60b8cfb1fb1fabf8aeeaf827087 (diff) | |
feat: Make ProcessContext a coroutine scope
This change makes the ProcessContext implement the CoroutineScope in
order to launch local coroutines bound to the lifecycle of the logical
process.
Diffstat (limited to 'odcsim/odcsim-engine-omega/src')
| -rw-r--r-- | odcsim/odcsim-engine-omega/src/main/kotlin/com/atlarge/odcsim/engine/omega/OmegaSimulationEngine.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/odcsim/odcsim-engine-omega/src/main/kotlin/com/atlarge/odcsim/engine/omega/OmegaSimulationEngine.kt b/odcsim/odcsim-engine-omega/src/main/kotlin/com/atlarge/odcsim/engine/omega/OmegaSimulationEngine.kt index 7a147291..207d2768 100644 --- a/odcsim/odcsim-engine-omega/src/main/kotlin/com/atlarge/odcsim/engine/omega/OmegaSimulationEngine.kt +++ b/odcsim/odcsim-engine-omega/src/main/kotlin/com/atlarge/odcsim/engine/omega/OmegaSimulationEngine.kt @@ -233,6 +233,10 @@ class OmegaSimulationEngine(rootBehavior: Behavior, override val name: String) : override val key: CoroutineContext.Key<*> = ProcessContext.Key @InternalCoroutinesApi + override val coroutineContext: CoroutineContext + get() = context + + @InternalCoroutinesApi override val context: CoroutineContext = this + dispatcher + job } |
