more performance

This commit is contained in:
adman
2026-03-26 23:34:30 +01:00
parent 9983062522
commit 7337068d86
3 changed files with 34 additions and 11 deletions
+5
View File
@@ -212,6 +212,11 @@ func (l *Loop) ContextDoneListener() (chSending <-chan any) {
return ch
}
func (l *Loop) IsTypeRegistered(t reflect.Type) bool {
_, ok := l.HandlerFunctions[t]
return ok
}
func (l *Loop) StartLoop() (err error) {
_ = *l // exit early on nil loop
l.RegisterEventSource(l.ContextDoneListener())