Open MichaelSnowden opened 1 year ago
Registration should happen before the channel is listening or serving at all.
While this may hide the race when registering multiple JSON methods, it doesn't help across separate register methods (e.g., if register is called separately).
Hello, we had a data race in Temporal's fork of tchannel-go here: https://github.com/temporalio/temporal/issues/5123. I think I found the culprit in
json.Register
: https://github.com/temporalio/temporal/issues/5123#issuecomment-1813538491. I can open a PR here similar to https://github.com/temporalio/tchannel-go/pull/7 if y'all are interested.