All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.copperleaf.ballast.repository.bus.EventBusImpl.kt Maven / Gradle / Ivy

There is a newer version: 4.2.1
Show newest version
package com.copperleaf.ballast.repository.bus

import com.copperleaf.ballast.EventHandlerScope
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.asSharedFlow

public class EventBusImpl : EventBus {
    private val _events = MutableSharedFlow()
    override val events: SharedFlow get() = _events.asSharedFlow()

    override suspend fun  EventHandlerScope.send(event: Any) {
        _events.emit(event)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy