Skip to content

Instantly share code, notes, and snippets.

View saintjab's full-sized avatar

Jonas Atta Boateng saintjab

  • Fingersfingers Ltd
  • UK
View GitHub Profile
@DaleLaw
DaleLaw / EventBus.kt
Last active November 2, 2023 15:25
Implement EventBus with Kotlin coroutine
object EventBus {
val bus: BroadcastChannel<Any> = BroadcastChannel()
fun send(o: Any) {
launch {
bus.send(o)
}
}