Package-level declarations

Types

Link copied to clipboard
expect class BackgroundThread

A unit of work started on a real, separate thread by startBackgroundThread.

actual class BackgroundThread

A unit of work started on a real, separate thread by startBackgroundThread.

actual class BackgroundThread

A unit of work started on a real, separate thread by startBackgroundThread.

Functions

Link copied to clipboard
fun runConcurrently(threadCount: Int, timeout: Duration = 10.seconds, action: (threadIndex: Int) -> Unit)

Runs action concurrently on threadCount real background threads. Blocks the calling thread until every thread returns or timeout elapses.

Link copied to clipboard
expect fun startBackgroundThread(block: () -> Unit): BackgroundThread

Starts block running on a new background thread.

actual fun startBackgroundThread(block: () -> Unit): BackgroundThread

Starts block running on a new background thread.

actual fun startBackgroundThread(block: () -> Unit): BackgroundThread

Starts block running on a new background thread.