Package-level declarations

Types

Link copied to clipboard

Class holding reference to the Application running Kaluga set application to your Application so default constructors work with the proper Context

Link copied to clipboard
data class IOSVersion(val major: Int, val minor: Int = 0, val patch: Int = 0) : Comparable<IOSVersion>

Wrapper for the iOS OS Version

Link copied to clipboard
actual data class KalugaThread

The thread of execution

expect class KalugaThread

The thread of execution

actual data class KalugaThread

The thread of execution

actual class KalugaThread

The thread of execution On JavaScript there is only one thread, so everything is the main thread

actual data class KalugaThread

The thread of execution

Properties

Link copied to clipboard

true if called from the main thread.

Link copied to clipboard

Functions

Link copied to clipboard
fun MultiplatformMainScope(): CoroutineScope
Link copied to clipboard
actual fun <T> runBlocking(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T

Runs a new coroutine and blocks the current thread interruptibly until its completion. This function should not be used from a coroutine. It is designed to bridge regular blocking code to libraries that are written in suspending style, to be used in main functions and in tests.

expect fun <T> runBlocking(context: CoroutineContext = EmptyCoroutineContext, block: suspend CoroutineScope.() -> T): T

Runs a new coroutine and blocks the current thread interruptibly until its completion. This function should not be used from a coroutine. It is designed to bridge regular blocking code to libraries that are written in suspending style, to be used in main functions and in tests.

actual fun <T> runBlocking(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T

Runs a new coroutine and blocks the current thread interruptibly until its completion. Since JavaScript does not support threading, this will just run block on GlobalScope

actual fun <T> runBlocking(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T

Runs a new coroutine and blocks the current thread interruptibly until its completion. This function should not be used from a coroutine. It is designed to bridge regular blocking code to libraries that are written in suspending style, to be used in main functions and in tests.

Link copied to clipboard
actual fun runOnMain(block: () -> Unit)

Runs the provided block on the main thread

expect fun runOnMain(block: () -> Unit)

Runs the provided block on the main thread

actual fun runOnMain(block: () -> Unit)

Runs the provided block on the main thread

actual fun runOnMain(block: () -> Unit)

Runs the provided block on the main thread. Since JavaScript does not have any threading, this will just run block

actual fun runOnMain(block: () -> Unit)

Runs the provided block on the main thread

Link copied to clipboard
actual fun singleThreadDispatcher(name: String): CloseableCoroutineDispatcher

Creates a coroutine execution context using a single thread.

expect fun singleThreadDispatcher(name: String): CloseableCoroutineDispatcher

Creates a coroutine execution context using a single thread.

actual fun singleThreadDispatcher(name: String): CloseableCoroutineDispatcher

Creates a coroutine execution context using a single thread.

actual fun singleThreadDispatcher(name: String): CloseableCoroutineDispatcher

Creates a coroutine execution context using a single thread. Since JavaScript does not have threading support, this will just return Dispatchers.Default

actual fun singleThreadDispatcher(name: String): CloseableCoroutineDispatcher

Creates a coroutine execution context using a single thread.

Link copied to clipboard
actual fun threadPoolDispatcher(numberOfThreads: UInt, name: String): CloseableCoroutineDispatcher

Creates a coroutine execution context using a thread pool.

expect fun threadPoolDispatcher(numberOfThreads: UInt, name: String): CloseableCoroutineDispatcher

Creates a coroutine execution context using a thread pool.

actual fun threadPoolDispatcher(numberOfThreads: UInt, name: String): CloseableCoroutineDispatcher

Creates a coroutine execution context using a thread pool. Since JavaScript does not have threading support, this will just return Dispatchers.Default

actual fun threadPoolDispatcher(numberOfThreads: UInt, name: String): CloseableCoroutineDispatcher

Creates a coroutine execution context using a thread pool.