Last active
April 2, 2024 19:11
-
-
Save krzdabrowski/ee85d06adc58f1a5a48d887d4be5c00c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EventDelegateImpl<EVENT> : EventDelegate<EVENT> { | |
private val eventChannel = Channel<EVENT>(Channel.BUFFERED) | |
override fun getEvents(): Flow<EVENT> = eventChannel.receiveAsFlow() | |
override suspend fun setEvent(event: EVENT) { | |
eventChannel.send(event) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment