Skip to content

06ED/Gofra

Repository files navigation

Gofra

Extremely fast, asynchronous event bus for kotlin

Install

repositories {
    mavenCentral()
    maven {
        url = uri("https://maven.pkg.github.com/06ED/Gofra")
    }
}

dependencies {
    implementation("com.github.06ED:gofra:1.0")
}

Example

class BenchmarkEventData(val data: String, val meow: List<String>)

object BenchmarkEvent : Gofra<BenchmarkEventData>()

suspend fun main() {
    repeat(100) {
        BenchmarkEvent.subscribe(EventListener {
            // TODO
        })
    }

    repeat(1_000_000) {
        BenchmarkEvent.notify(BenchmarkEventData(data = "", meow = emptyList()))
    }
}

About

Event bus for kotlin

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages