Navigation Menu

Skip to content

Commit

Permalink
Updated Kotlin to 1.6.10 and coroutines to 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arkivanov committed Feb 10, 2022
1 parent c447e47 commit fca5b24
Show file tree
Hide file tree
Showing 4 changed files with 2,922 additions and 5 deletions.
Expand Up @@ -6,8 +6,10 @@ import com.badoo.reaktive.observable.Observable
import com.badoo.reaktive.observable.ObservableObserver
import com.badoo.reaktive.utils.ensureNeverFrozen
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.buffer
import kotlinx.coroutines.flow.channelFlow

@ExperimentalCoroutinesApi
Expand All @@ -24,7 +26,7 @@ fun <T> Observable<T>.asFlow(): Flow<T> =
}

override fun onNext(value: T) {
channel.offer(value)
channel.trySend(value)
}

override fun onComplete() {
Expand All @@ -43,4 +45,4 @@ fun <T> Observable<T>.asFlow(): Flow<T> =
}

awaitClose(serialDisposable::dispose)
}
}.buffer(capacity = Channel.UNLIMITED)
Expand Up @@ -85,7 +85,7 @@ internal class CoroutineContextScheduler(

override fun submitRepeating(startDelayMillis: Long, periodMillis: Long, task: () -> Unit) {
channelRef.value?.channel?.apply {
offer(
trySend(
Task(
startAtMillis = clock.uptimeMillis + startDelayMillis,
periodMillis = periodMillis,
Expand Down
Expand Up @@ -2,8 +2,8 @@ package com.badoo.reaktive.dependencies

object Deps {

private const val kotlinVersion = "1.6.0"
private const val coroutinesVersion = "1.5.2"
private const val kotlinVersion = "1.6.10"
private const val coroutinesVersion = "1.6.0"
private const val detektVersion = "1.9.1"

val kotlin = Kotlin
Expand Down

0 comments on commit fca5b24

Please sign in to comment.