Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase buffer capacity for mutableRouterEvents flow within RibEvents #635

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ package com.uber.rib.core
import androidx.annotation.VisibleForTesting
import io.reactivex.Observable
import kotlinx.coroutines.channels.BufferOverflow
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.rx2.asObservable

public object RibEvents {

private val mutableRouterEvents =
MutableSharedFlow<RibRouterEvent>(0, 1, BufferOverflow.DROP_OLDEST)
MutableSharedFlow<RibRouterEvent>(0, Channel.UNLIMITED, BufferOverflow.DROP_OLDEST)
private val mutableRibDurationEvents =
MutableSharedFlow<RibActionInfo>(0, 1, BufferOverflow.DROP_OLDEST)
MutableSharedFlow<RibActionInfo>(0, Channel.UNLIMITED, BufferOverflow.DROP_OLDEST)

@JvmStatic
public val routerEvents: Observable<RibRouterEvent> = mutableRouterEvents.asObservable()
Expand Down
Loading