diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2019-11-19 09:57:34 +0100 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2019-11-19 09:57:34 +0100 |
commit | dc0d136a1efa54ca30cf272a868e2a4b80f36adb (patch) | |
tree | 5223c21abe2de0483d6e5fd0d1ba6b508dda0419 /sw-ui-kt/src/main/kotlin/org/luxons | |
parent | WIP name form fix (diff) | |
download | seven-wonders-dc0d136a1efa54ca30cf272a868e2a4b80f36adb.tar.gz seven-wonders-dc0d136a1efa54ca30cf272a868e2a4b80f36adb.tar.bz2 seven-wonders-dc0d136a1efa54ca30cf272a868e2a4b80f36adb.zip |
Improve saga KDoc
Diffstat (limited to 'sw-ui-kt/src/main/kotlin/org/luxons')
-rw-r--r-- | sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt | 5 |
1 files changed, 3 insertions, 2 deletions
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<S, A : RAction, R>( } /** - * 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<S, A, R>.(A) -> Unit) { val channel = actions.openSubscription() @@ -90,7 +90,8 @@ class SagaContext<S, A : RAction, R>( } /** - * 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 <reified T : A> onEach( crossinline handle: suspend SagaContext<S, A, R>.(T) -> Unit |