Skip to content

Instantly share code, notes, and snippets.

View itsusmon's full-sized avatar
:shipit:
Working on side projects.

Usmon Abdurakhmanov itsusmon

:shipit:
Working on side projects.
  • Mimsoft
  • Tashkent, Uzbekistan
  • 21:15 (UTC +05:00)
  • LinkedIn in/itsusmon
View GitHub Profile
/**
* Inspired by Jaewoong Eum's flow-operators library (https://github.com/skydoves/flow-operators).
*/
class Restartable {
private val restartFlow = MutableSharedFlow<SharingCommand>(extraBufferCapacity = 2)
fun restart() {
restartFlow.tryEmit(SharingCommand.STOP_AND_RESET_REPLAY_CACHE)