/kotlin-async-des

A proof of concept for a discrete event simulation using kotlin's coroutines

Primary LanguageKotlinApache License 2.0Apache-2.0

Discrete Event Simulation using Kotlin coroutines

A discrete event simulation implemented as a kotlin custom event loop. Unfortunately, not all APIs required to pull it off are stable:

  • the EventLoop API is private, which prevents hooking into runBlocking. runSimulation is an equivalent of runBlocking, reconstructed using the public API.
  • the Delay API is required to properly hook into the delay function. This API is public, but marked as internal, which requires @OptIn(InternalCoroutinesApi::class).