EventBus
EventBus copied to clipboard
[Go] Lightweight eventbus with async compatibility for Go
Most of the tests have several fail conditions that are unrecognizable (tests do not log which of the conditions failed). I suggest we use some kind of assertion lib (testify...
Server main.go `package main import ( evbus "github.com/asaskevich/EventBus" ) func main() { server := evbus.NewServer(":8090", "/_server_bus_", evbus.New()) server.Start() // ... server.EventBus().Publish("main:calculator", 4, 6) }` Client main.go ` package main import...
Multiple OnceAsync functions will be executed multiple times fix https://github.com/asaskevich/EventBus/issues/60
![image](https://github.com/asaskevich/EventBus/assets/19323900/67b089e9-dcb9-4b4d-b563-fd9957a483a6)
Creating functions within a loop in Go can result in unexpected behavior, such as multiple functions sharing the same pointer value. The `reflect.DeepEqual(handler.callBack, callback)` check has been includedas a final...
There are multiple places where reflect is being used. Wouldnt that cause performance issues?
```golang import ( "github.com/asaskevich/EventBus" "github.com/stretchr/testify/require" "testing" ) func TestAsaskevichBus_UnsubscribeClosureMiddle(t *testing.T) { callCount := 0 sum := 0 makeFn := func(a int) func() { return func() { callCount++ sum += a...