Runnable

expect fun interface Runnable(source)

A runnable task for CoroutineDispatcher.dispatch.

It is equivalent to the type () -> Unit, but on the JVM, it is represented as a java.lang.Runnable, making it easier to wrap the interfaces that expect java.lang.Runnable into a CoroutineDispatcher.

actual fun interface Runnable(source)

A runnable task for CoroutineDispatcher.dispatch.

Equivalent to the type () -> Unit.

actual typealias Runnable = java.lang.Runnable(source)

A runnable task for CoroutineDispatcher.dispatch.

It is a typealias for java.lang.Runnable, which is widely used in Java APIs. This makes it possible to directly pass the argument of CoroutineDispatcher.dispatch to the underlying Java implementation without any additional wrapping.

actual fun interface Runnable(source)

A runnable task for CoroutineDispatcher.dispatch.

Equivalent to the type () -> Unit.