Merge pull request #79 from InsanusMokrassar/0.5.15

0.5.15
This commit is contained in:
InsanusMokrassar 2021-06-28 01:00:58 +06:00 committed by GitHub
commit d1a247af8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,11 @@
# Changelog
## 0.5.14
## 0.5.15 HOTFIX FOR 0.5.14
* `Coroutines`
* Fixes in `subscribeAsync`
## 0.5.14 NOT RECOMMENDED
* `Versions`
* `Kotlin`: `1.5.10` -> `1.5.20`

View File

@ -38,7 +38,7 @@ private data class AsyncSubscriptionCommandData<T, M>(
override suspend fun invoke(markersMap: MutableMap<M, SubscribeAsyncReceiver<T>>) {
val marker = markerFactory(data)
markersMap.getOrPut(marker) {
SubscribeAsyncReceiver(scope) {
SubscribeAsyncReceiver(scope.LinkedSupervisorScope()) {
safelyWithoutExceptions { block(it) }
if (isEmpty()) {
onEmpty(marker)
@ -80,7 +80,7 @@ fun <T, M> Flow<T>.subscribeAsync(
actor.send(dataCommand)
}
job.invokeOnCompletion { subscope.cancel() }
job.invokeOnCompletion { if (subscope.isActive) subscope.cancel() }
return job
}

View File

@ -45,5 +45,5 @@ dokka_version=1.4.32
# Project data
group=dev.inmo
version=0.5.14
android_code_version=55
version=0.5.15
android_code_version=56