ITADN
mautrix/go/Issues

Are events processed in the background?

#441Closedselfhoster1312 创建于 2025-12-12
S
selfhoster1312commented
Hello, we are in the process of replacing the old go-xmpp with mautrix in the [matterbridge community fork](https://github.com/matterbridge-org) and i'm currently reviewing the PR for that: https://github.com/matterbridge-org/matterbridge/pull/75 I just had a tiny question to guide my review: we register event handlers with `syncer.OnEventType` but are those callbacks then dispatched in the background or in the main thread/goroutine? I don't see any `go func()…` here: https://github.com/mautrix/go/blob/efd4136c7a9361090dbbac69d9a7af59a568e68e/sync.go#L162 I wouldn't like our client to get stuck waiting for a HTTP response so i need to know what we should compartmentalize in background goroutines on our side :) Thanks for your time and sorry to bother you with such a triviality. I wouldn't have asked if i had found the information in the go docs for Syncer, or in the README, if that helps.
关闭于 2025-12-12 1 条评论