Ensure schemas wait for init

This commit is contained in:
Sergey Krashevich
2026-02-13 10:33:18 +03:00
parent 2735bafd86
commit aa4e90d9d8
4 changed files with 72 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
package streams
import "sync"
var (
ready = make(chan struct{})
readyOnce sync.Once
)
func SetReady() {
readyOnce.Do(func() {
close(ready)
})
}
func WaitReady() {
<-ready
}