mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-18 22:57:14 +00:00
commit
d1a247af8c
@ -1,6 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 0.5.14
|
## 0.5.15 HOTFIX FOR 0.5.14
|
||||||
|
|
||||||
|
* `Coroutines`
|
||||||
|
* Fixes in `subscribeAsync`
|
||||||
|
|
||||||
|
## 0.5.14 NOT RECOMMENDED
|
||||||
|
|
||||||
* `Versions`
|
* `Versions`
|
||||||
* `Kotlin`: `1.5.10` -> `1.5.20`
|
* `Kotlin`: `1.5.10` -> `1.5.20`
|
||||||
|
@ -38,7 +38,7 @@ private data class AsyncSubscriptionCommandData<T, M>(
|
|||||||
override suspend fun invoke(markersMap: MutableMap<M, SubscribeAsyncReceiver<T>>) {
|
override suspend fun invoke(markersMap: MutableMap<M, SubscribeAsyncReceiver<T>>) {
|
||||||
val marker = markerFactory(data)
|
val marker = markerFactory(data)
|
||||||
markersMap.getOrPut(marker) {
|
markersMap.getOrPut(marker) {
|
||||||
SubscribeAsyncReceiver(scope) {
|
SubscribeAsyncReceiver(scope.LinkedSupervisorScope()) {
|
||||||
safelyWithoutExceptions { block(it) }
|
safelyWithoutExceptions { block(it) }
|
||||||
if (isEmpty()) {
|
if (isEmpty()) {
|
||||||
onEmpty(marker)
|
onEmpty(marker)
|
||||||
@ -80,7 +80,7 @@ fun <T, M> Flow<T>.subscribeAsync(
|
|||||||
actor.send(dataCommand)
|
actor.send(dataCommand)
|
||||||
}
|
}
|
||||||
|
|
||||||
job.invokeOnCompletion { subscope.cancel() }
|
job.invokeOnCompletion { if (subscope.isActive) subscope.cancel() }
|
||||||
|
|
||||||
return job
|
return job
|
||||||
}
|
}
|
||||||
|
@ -45,5 +45,5 @@ dokka_version=1.4.32
|
|||||||
# Project data
|
# Project data
|
||||||
|
|
||||||
group=dev.inmo
|
group=dev.inmo
|
||||||
version=0.5.14
|
version=0.5.15
|
||||||
android_code_version=55
|
android_code_version=56
|
||||||
|
Loading…
Reference in New Issue
Block a user