introduced benchmarks on publishing messages

This commit is contained in:
2024-08-08 13:06:57 +01:00
parent 1b3ead2dd9
commit 8d5cd7e599
7 changed files with 184 additions and 13 deletions

View File

@@ -9,3 +9,8 @@ func Forever[T any](fn func(T)) Subscriber[T] {
return true
}
}
// NoOp creates a sbscriber that does absolutely nothing forever. This is mostly useful for testing.
func NoOp[T any]() Subscriber[T] {
return func(_ T) bool { return true }
}