Survivable
可存活的。 此接口提供 join、invokeOnCompletion 等函数来对生命周期提供一定操作。
Author
ForteScarlet
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
延时 duration 时间后执行回调函数 runnable,得到一个 DelayableCompletableFuture。
延迟 millis 毫秒后执行 runnable,得到一个 DelayableCompletableFuture。
open fun delay(time: Long, timeUnit: TimeUnit, runnable: Runnable): DelayableCompletableFuture<Void?>
延迟时间单位为 timeUnit 的 time 时长后执行 runnable,得到一个 DelayableCompletableFuture。
Link copied to clipboard
open fun <V> delayAndCompute(duration: JavaDuration, supplier: Supplier<V>): DelayableCompletableFuture<V>
延迟 duration 时间后,执行 supplier, 并将 supplier 得到结果通过得到的 DelayableCompletableFuture 向下传递。
延迟 millis 毫秒的时长后执行 supplier, 并将 supplier 得到结果通过得到的 DelayableCompletableFuture 向下传递。
open fun <V> delayAndCompute(time: Long, timeUnit: TimeUnit, supplier: Supplier<V>): DelayableCompletableFuture<V>
延迟时间单位为 timeUnit 的 time 时长后执行 supplier, 并将 supplier 得到结果通过得到的 DelayableCompletableFuture 向下传递。
Link copied to clipboard
当完成(或被cancel)时执行一段处理。
Properties
Inheritors
Extensions
Link copied to clipboard
fun <A : Application> CoroutineScope.applicationLauncher(create: suspend () -> A): ApplicationLauncher<A>
通过一个协程作用域并提供构建函数来得到一个 ApplicationLauncher 实例。
Link copied to clipboard
Link copied to clipboard
提供 CoroutineScope 和构建 Flow 的函数 flowFactory 来构建 Items.
Link copied to clipboard
inline fun <T> CoroutineScope.itemsByFlow(crossinline flowFactory: (Items.PreprocessingProperties) -> Flow<T>): Items<T>
提供 CoroutineScope 和构建 Flow 的函数 flowFactory 来构建 Items.
Link copied to clipboard
inline fun <T> CoroutineScope.produceItems(context: CoroutineContext = EmptyCoroutineContext, capacity: Int = 0, crossinline block: suspend ProducerScope<T>.(Items.PreprocessingProperties) -> Unit): Items<T>
通过 produce 构建 ChannelIterator 来得到一个 Items 实例。