Zum Inhalt springen

Thread Without Join (ARCH8041)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key kotlin.async.thread-without-join · Severity warning · Category async

Flags Thread(...).start() / thread { } whose Thread is never joined or stored - its failures are invisible and the caller cannot wait for it.

thread { export() }
val t = thread { export() }
t.join()

Keep the Thread and join it, or move the work to a coroutine on a structured scope.