Skip to content

Commit

Permalink
Merge pull request #635 from RahulDMello/feature/increase_rib_event_b…
Browse files Browse the repository at this point in the history
…uffer_size

Increase buffer capacity for mutableRouterEvents flow within RibEvents
  • Loading branch information
tyvsmith authored Jul 3, 2024
2 parents ff46554 + a7b33ad commit 5aafed4
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 5aafed4

Please sign in to comment.