Package com.jetbrains.rd.framework.util

Types

Link copied to clipboard
object NetUtils
Link copied to clipboard
data class PortPair

Functions

Link copied to clipboard
fun <T> ISource<T>.adviseSuspend(    lifetime: Lifetime,     scheduler: IScheduler,     handler: suspend (T) -> Unit)
fun <T> ISource<T>.adviseSuspend(    lifetime: Lifetime,     context: CoroutineContext,     handler: suspend (T) -> Unit)
Link copied to clipboard
fun <T> IRdTask<T>.asCompletableFuture(): CompletableFuture<T>
Link copied to clipboard
fun IScheduler.asCoroutineDispatcher(allowInlining: Boolean): CoroutineDispatcher
Link copied to clipboard
suspend fun <T> IRdTask<T>.await(): T
Link copied to clipboard
suspend fun <T> Collection<IRdTask<T>>.awaitAll(): List<T>
Link copied to clipboard
fun Lifetime.createTerminatedAfter(duration: Duration, terminationContext: CoroutineContext): Lifetime
Link copied to clipboard
fun Lifetime.launch(    scheduler: IScheduler,     start: CoroutineStart = CoroutineStart.DEFAULT,     block: suspend CoroutineScope.() -> Unit): Job
fun Lifetime.launch(    context: CoroutineContext = EmptyCoroutineContext,     start: CoroutineStart = CoroutineStart.DEFAULT,     block: suspend CoroutineScope.() -> Unit): Job
Link copied to clipboard
fun CoroutineScope.launchChild(    lifetime: Lifetime,     scheduler: IScheduler,     start: CoroutineStart = CoroutineStart.DEFAULT,     block: suspend CoroutineScope.() -> Unit): Job
fun CoroutineScope.launchChild(    lifetime: Lifetime,     context: CoroutineContext = EmptyCoroutineContext,     start: CoroutineStart = CoroutineStart.DEFAULT,     block: suspend CoroutineScope.() -> Unit): Job
Link copied to clipboard
suspend fun <T> lifetimedCoroutineScope(lifetime: Lifetime, action: suspend CoroutineScope.() -> T): T

Creates a coroutineScope that will be cancelled on the passed lifetime termination

Link copied to clipboard
suspend fun ISource<Boolean>.nextFalseValue(lifetime: Lifetime = Lifetime.Eternal): Boolean
Link copied to clipboard
fun ISource<Boolean>.nextFalseValueAsync(lifetime: Lifetime): Deferred<Boolean>
Link copied to clipboard
suspend fun <T : Any> ISource<T?>.nextNotNullValue(lifetime: Lifetime = Lifetime.Eternal): T
Link copied to clipboard
fun <T : Any> ISource<T?>.nextNotNullValueAsync(lifetime: Lifetime): Deferred<T>
Link copied to clipboard
suspend fun ISource<Boolean>.nextTrueValue(lifetime: Lifetime = Lifetime.Eternal): Boolean
Link copied to clipboard
fun ISource<Boolean>.nextTrueValueAsync(lifetime: Lifetime): Deferred<Boolean>
Link copied to clipboard
suspend fun <T> ISource<T>.nextValue(lifetime: Lifetime = Lifetime.Eternal, condition: (T) -> Boolean = { true }): T
Link copied to clipboard
fun <T> ISource<T>.nextValueAsync(lifetime: Lifetime, condition: (T) -> Boolean = { true }): Deferred<T>
Link copied to clipboard
fun <TReq, TRes> IRdEndpoint<TReq, TRes>.setSuspend(    cancellationScheduler: IScheduler? = null,     handlerScheduler: IScheduler? = null,     handler: suspend (Lifetime, TReq) -> TRes)
Link copied to clipboard
fun <T> Lifetime.startAsync(    scheduler: IScheduler,     start: CoroutineStart = CoroutineStart.DEFAULT,     block: suspend CoroutineScope.() -> T): Deferred<T>
fun <T> Lifetime.startAsync(    context: CoroutineContext = EmptyCoroutineContext,     start: CoroutineStart = CoroutineStart.DEFAULT,     block: suspend CoroutineScope.() -> T): Deferred<T>
Link copied to clipboard
fun <T> CoroutineScope.startChildAsync(    lifetime: Lifetime,     scheduler: IScheduler,     start: CoroutineStart = CoroutineStart.DEFAULT,     block: suspend CoroutineScope.() -> T): Deferred<T>
fun <T> CoroutineScope.startChildAsync(    lifetime: Lifetime,     context: CoroutineContext = EmptyCoroutineContext,     start: CoroutineStart = CoroutineStart.DEFAULT,     block: suspend CoroutineScope.() -> T): Deferred<T>
Link copied to clipboard
fun LifetimeDefinition.synchronizeWith(scope: CoroutineScope, supportsTerminationUnderExecution: Boolean = false)
fun LifetimeDefinition.synchronizeWith(job: Job, supportsTerminationUnderExecution: Boolean = false)
Link copied to clipboard
fun <T> CompletionStage<T>.toRdTask(): RdTask<T>
fun <T> Deferred<T>.toRdTask(): RdTask<T>
Link copied to clipboard
suspend fun Lifetime.waitFor(    timeout: Duration,     maxDelay: Long = 256,     condition: suspend () -> Boolean): Boolean
Link copied to clipboard
suspend fun <T> withContext(scheduler: IScheduler, block: suspend CoroutineScope.() -> T): T
suspend fun <T> withContext(    lifetime: Lifetime,     scheduler: IScheduler,     block: suspend CoroutineScope.() -> T): T
suspend fun <T> withContext(    lifetime: Lifetime,     context: CoroutineContext,     block: suspend CoroutineScope.() -> T): T

Properties

Link copied to clipboard
val IScheduler.asCoroutineDispatcher: CoroutineDispatcher