Package-level declarations

Types

Link copied to clipboard
class AsyncByteArrayDeque(bufferSize: Int = 1024) : IAsyncByteArrayDeque
Link copied to clipboard
class AsyncByteArrayDequeChunked(val maxSize: Int = AsyncByteArrayDequeChunked.DEFAULT_MAX_SIZE) : IAsyncByteArrayDeque
Link copied to clipboard
Link copied to clipboard
class AsyncCacheGen<T>(gen: suspend (key: String) -> T)
Link copied to clipboard
interface AsyncCloseable
Link copied to clipboard
actual typealias AsyncEntryPointResult = Unit
actual typealias AsyncEntryPointResult = Unit
actual external class AsyncEntryPointResult(func: (resolve: (Unit) -> Unit, reject: (Throwable) -> Unit) -> Unit)
actual typealias AsyncEntryPointResult = Unit
Link copied to clipboard
class AsyncInmemoryCache(val timeProvider: TimeProvider = TimeProvider)
Link copied to clipboard
class AsyncInmemoryEntry<T : Any>(val clazz: KClass<T>, val cache: AsyncInmemoryCache, val key: String, val ttl: TimeSpan)
Link copied to clipboard
interface AsyncInvokable
Link copied to clipboard
Link copied to clipboard
class AsyncQueueWithContext(val queue: AsyncQueue, val context: CoroutineContext)
Link copied to clipboard
class AsyncSignal<T>(onRegister: () -> Unit = {}) : BaseSignal<T, suspend (T) -> Unit>
Link copied to clipboard
Link copied to clipboard

Creates a queue of processes that will be executed one after another by effectively preventing from executing them at the same time. This class is thread-safe.

Link copied to clipboard
abstract class BaseSignal<T, THandler>(val onRegister: () -> Unit = {})
Link copied to clipboard
abstract class BaseSignal2<T1, T2>(val onRegister: () -> Unit = {})
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class NamedAsyncThreads(val threadFactory: () -> AsyncInvokable = { AsyncThread2() })

Prevents a named invoke to happen at the same time (by effectively enqueuing by name). This class is thread-safe.

Link copied to clipboard
class ObservableProperty<T>(initial: T)
Link copied to clipboard
data class PreferSyncIo(val preferSyncIo: Boolean) : CoroutineContext.Element
Link copied to clipboard
interface Promise<T>

A simple interface compatible with JS Promise used for interop. In other cases just use CompletableDeferred instead.

Link copied to clipboard
class Signal<T>(onRegister: () -> Unit = {}) : BaseSignal<T, (T) -> Unit>
Link copied to clipboard
class Signal2<T1, T2>(onRegister: () -> Unit = {}) : BaseSignal2<T1, T2>

Properties

Link copied to clipboard
actual val Dispatchers.CIO: CoroutineDispatcher
expect val Dispatchers.CIO: CoroutineDispatcher
actual val Dispatchers.CIO: CoroutineDispatcher
actual val Dispatchers.CIO: CoroutineDispatcher
actual val Dispatchers.CIO: CoroutineDispatcher
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
actual val Dispatchers.ResourceDecoder: CoroutineDispatcher
expect val Dispatchers.ResourceDecoder: CoroutineDispatcher
actual val Dispatchers.ResourceDecoder: CoroutineDispatcher
actual val Dispatchers.ResourceDecoder: CoroutineDispatcher
actual val Dispatchers.ResourceDecoder: CoroutineDispatcher

Functions

Link copied to clipboard
fun Signal<Unit>.addCallInit(handler: (Unit) -> Unit): Closeable
fun <T> Signal<T>.addCallInit(initial: T, handler: (T) -> Unit): Closeable
Link copied to clipboard
suspend fun <T> Signal<T>.addSuspend(handler: suspend (T) -> Unit): Closeable
fun <T> Signal<T>.addSuspend(context: CoroutineContext, handler: suspend (T) -> Unit): Closeable
Link copied to clipboard
fun <T> async(context: CoroutineContext, callback: suspend () -> T): Deferred<T>
Link copied to clipboard
fun <T> CoroutineScope.async(callback: suspend () -> T): Deferred<T>
Link copied to clipboard
fun <T> asyncAsap(context: CoroutineContext, callback: suspend () -> T): Deferred<T>
Link copied to clipboard
fun <T> CoroutineScope.asyncAsap(callback: suspend () -> T): Deferred<T>
Link copied to clipboard
actual fun asyncEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
expect fun asyncEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
actual fun asyncEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
actual fun asyncEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
actual fun asyncEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
Link copied to clipboard
fun <T> asyncImmediately(context: CoroutineContext, callback: suspend () -> T): Deferred<T>
Link copied to clipboard
fun <T> CoroutineScope.asyncImmediately(callback: suspend () -> T): Deferred<T>
Link copied to clipboard
actual fun asyncTestEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
expect fun asyncTestEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
actual fun asyncTestEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
actual fun asyncTestEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
actual fun asyncTestEntryPoint(callback: suspend () -> Unit): AsyncEntryPointResult
Link copied to clipboard
suspend fun <T> Promise<T>.await(): T
suspend fun <T> Future<T>.await(): T
Link copied to clipboard
suspend fun <T> ReceiveChannel<T>.chunks(count: Int): ReceiveChannel<List<T>>
Link copied to clipboard
suspend fun CoroutineContext.delay(time: TimeSpan)
Link copied to clipboard
inline suspend fun <T> Iterable<Signal<T>>.executeAndWaitAnySignal(callback: () -> Unit): Pair<Signal<T>, T>
inline suspend fun <T> Map<Signal<Unit>, T>.executeAndWaitAnySignal(callback: () -> Unit): T
Link copied to clipboard
inline suspend fun <T> Signal<T>.executeAndWaitSignal(callback: () -> Unit): T
Link copied to clipboard
suspend operator fun AsyncSignal<Unit>.invoke()
operator fun Signal<Unit>.invoke()
operator fun ExecutorService.invoke(callback: () -> Unit)
Link copied to clipboard
suspend fun Method.invokeSuspend(obj: Any?, args: List<Any?>): Any?
Link copied to clipboard
fun <T> Deferred<T>.jvmSyncAwait(): T
Link copied to clipboard
fun launch(context: CoroutineContext, callback: suspend () -> Unit): Job
Link copied to clipboard
fun CoroutineScope.launch(callback: suspend () -> Unit): Job
Link copied to clipboard
fun launchAsap(context: CoroutineContext, callback: suspend () -> Unit): Job
Link copied to clipboard
fun CoroutineScope.launchAsap(callback: suspend () -> Unit): Job
Link copied to clipboard
fun launchImmediately(context: CoroutineContext, callback: suspend () -> Unit): Job
Link copied to clipboard
fun CoroutineScope.launchImmediately(callback: suspend () -> Unit): Job
Link copied to clipboard
fun CoroutineContext.launchUnscoped(block: suspend () -> Unit)
fun CoroutineScope.launchUnscoped(block: suspend () -> Unit)
Link copied to clipboard
suspend fun <T> CoroutineContext.launchUnscopedAndWait(block: suspend () -> T): T
Link copied to clipboard
fun <TI, TO> AsyncSignal<TI>.mapSignal(transform: (TI) -> TO): AsyncSignal<TO>
fun <TI, TO> Signal<TI>.mapSignal(transform: (TI) -> TO): Signal<TO>
Link copied to clipboard
fun <T : Any, R : Any> T.noSuspend(callback: suspend T.() -> R): R

Allows to execute a suspendable block as long as you can ensure no suspending will happen at all..

Link copied to clipboard
Link copied to clipboard
suspend fun <E> produce(capacity: Int = 0, block: suspend ProducerScope<E>.() -> Unit): ReceiveChannel<E>
Link copied to clipboard
expect fun <T> Promise(coroutineContext: CoroutineContext = EmptyCoroutineContext, executor: (resolve: (T) -> Unit, reject: (Throwable) -> Unit) -> Unit): Promise<T>

A simple interface compatible with JS Promise used for interop. In other cases just use CompletableDeferred instead.

actual fun <T> Promise(coroutineContext: CoroutineContext, executor: (resolve: (T) -> Unit, reject: (Throwable) -> Unit) -> Unit): Promise<T>
actual fun <T> Promise(coroutineContext: CoroutineContext, executor: (resolve: (T) -> Unit, reject: (Throwable) -> Unit) -> Unit): Promise<T>
Link copied to clipboard
actual fun <T> runBlockingNoJs(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T
expect fun <T> runBlockingNoJs(context: CoroutineContext = EmptyCoroutineContext, block: suspend CoroutineScope.() -> T): T
actual fun <T> runBlockingNoJs(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T
actual fun <T> runBlockingNoJs(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T
actual fun <T> runBlockingNoJs(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T
Link copied to clipboard
fun <T : Any> runBlockingNoSuspensions(callback: suspend () -> T): T

Allows to execute a suspendable block as long as you can ensure no suspending will happen at all..

Link copied to clipboard
fun <T> runBlockingNoSuspensionsNullable(callback: suspend () -> T): T
Link copied to clipboard
suspend fun <T> SPromise(executor: (resolve: (T) -> Unit, reject: (Throwable) -> Unit) -> Unit): Promise<T>
Link copied to clipboard
fun suspendTest(timeout: TimeSpan? = DEFAULT_SUSPEND_TEST_TIMEOUT, preferSyncIo: Boolean? = null, callback: suspend CoroutineScope.() -> Unit): AsyncEntryPointResult
fun suspendTest(cond: () -> Boolean, timeout: TimeSpan? = DEFAULT_SUSPEND_TEST_TIMEOUT, preferSyncIo: Boolean? = DEFAULT_TEST_SYNC_IO, callback: suspend CoroutineScope.() -> Unit): AsyncEntryPointResult
Link copied to clipboard
fun suspendTestNoBrowser(preferSyncIo: Boolean? = DEFAULT_TEST_SYNC_IO, callback: suspend CoroutineScope.() -> Unit): AsyncEntryPointResult
Link copied to clipboard
fun suspendTestNoJs(preferSyncIo: Boolean? = DEFAULT_TEST_SYNC_IO, callback: suspend CoroutineScope.() -> Unit): AsyncEntryPointResult
Link copied to clipboard
Link copied to clipboard
suspend fun <T> Iterable<T>.toChannel(): ReceiveChannel<T>
suspend fun <T> Flow<T>.toChannel(): ReceiveChannel<T>
Link copied to clipboard
fun <T> Promise<T>.toDeferred(): Deferred<T>
Link copied to clipboard
suspend fun <T> Deferred<T>.toPromise(): Promise<T>
suspend fun Job.toPromise(): Promise<Unit>
fun <T> Deferred<T>.toPromise(coroutineContext: CoroutineContext): Promise<T>
fun Job.toPromise(coroutineContext: CoroutineContext): Promise<Unit>
Link copied to clipboard
inline suspend fun <T : AsyncCloseable, TR> T.use(callback: T.() -> TR): TR
Link copied to clipboard
inline suspend fun <T : AsyncCloseable, TR> T.useIt(callback: (T) -> TR): TR
Link copied to clipboard
suspend fun <T> AsyncSignal<T>.waitOne(): T
suspend fun <T1, T2> Signal2<T1, T2>.waitOne(): Pair<T1, T2>
suspend fun <T> Signal<T>.waitOne(): T
suspend fun Iterable<Signal<*>>.waitOne(): Any?
suspend fun <T> Signal<T>.waitOne(timeout: TimeSpan): T?
Link copied to clipboard
fun <T> Signal<T>.waitOneAsync(): Deferred<T>
Link copied to clipboard
suspend fun <T> Signal<T>.waitOneOpt(timeout: TimeSpan?): T?
Link copied to clipboard
suspend fun <T> waitSubscriber(block: ((T) -> Unit) -> Cancellable): T
Link copied to clipboard
suspend fun <T> waitSubscriberCloseable(block: ((T) -> Unit) -> Closeable): T
Link copied to clipboard
suspend fun <T> withTimeoutNullable(time: TimeSpan?, block: suspend CoroutineScope.() -> T): T