You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it appears go-operational is not thread safe, in particular the Status struct. Example https://github.com/utilitywarehouse/go-operational/blob/master/op/opstatus.go#L47-L50 I think we should clarify that it's not thread safe (although this is usually assumed the default) or add support for it. Additional work would need to be done around handlers to ensure they assume that e.g. checks could be registered at any time.
My use case for adding support is it will allow starting a process which spawns multiple go routines in parallel where they have a need to register a status check. e.g. gRPC service, message consumer and ops server as separate go routines. This should improve start up time.
The downside of adding locking is a performance penalty.
The text was updated successfully, but these errors were encountered:
Currently it appears go-operational is not thread safe, in particular the Status struct. Example https://github.com/utilitywarehouse/go-operational/blob/master/op/opstatus.go#L47-L50 I think we should clarify that it's not thread safe (although this is usually assumed the default) or add support for it. Additional work would need to be done around handlers to ensure they assume that e.g. checks could be registered at any time.
My use case for adding support is it will allow starting a process which spawns multiple go routines in parallel where they have a need to register a status check. e.g. gRPC service, message consumer and ops server as separate go routines. This should improve start up time.
The downside of adding locking is a performance penalty.
The text was updated successfully, but these errors were encountered: