From dc0d136a1efa54ca30cf272a868e2a4b80f36adb Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Tue, 19 Nov 2019 09:57:34 +0100 Subject: Improve saga KDoc --- .../kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw-ui-kt/src/main/kotlin/org/luxons') diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt index c7184cea..fddaf85c 100644 --- a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt +++ b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt @@ -76,7 +76,7 @@ class SagaContext( } /** - * Starts a concurrent coroutine that executes [handle] on every action dispatched. + * Executes [handle] on every action dispatched. This runs forever until the current coroutine is cancelled. */ suspend fun onEach(handle: suspend SagaContext.(A) -> Unit) { val channel = actions.openSubscription() @@ -90,7 +90,8 @@ class SagaContext( } /** - * Starts a concurrent coroutine that executes [handle] on every action dispatched of the type [T]. + * Executes [handle] on every action dispatched of the type [T]. This runs forever until the current coroutine is + * cancelled. */ suspend inline fun onEach( crossinline handle: suspend SagaContext.(T) -> Unit -- cgit