Skip to content

Wasm/WASI: calling delay() silently exits wasmWasiNodeRun #4239

@OliverO2

Description

@OliverO2

Versions:

  • kotlinx.coroutines 1.9.0
  • Kotlin 2.0.20

Running the following code in commonMain:

import kotlinx.coroutines.delay
import kotlin.time.Duration.Companion.seconds

suspend fun main() {
    println("main: before delay")
    delay(1.seconds)
    println("main: after delay")
}

This works on Wasm/JS,

> Task :wasmJsNodeRun
main: before delay
main: after delay

but silently exits on Wasm/WASI:

> Task :wasmWasiNodeRun
main: before delay

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions