protobuf-go/reflect/protoregistry
Joe Tsai 73618879f4 reflect/protoregistry: protect global registries with a lock
The global registry is initialized via generated code.
The Go language guarantees that these are serialized (non concurrently).
The main concern is when a concurrent read operation occurs while
registration is still ongoing. In such a case, we do need a lock to
serialize the read with regard to the writes (i.e. registrations).

Change-Id: Ied35d6f8d2620f448cb281c3ec46d8de893b5671
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/199217
Reviewed-by: Damien Neil <dneil@google.com>
2019-10-06 03:28:52 +00:00
..
testprotos all: unify protoV1.ExtensionDesc and proto.ExtensionType 2019-08-20 21:32:57 +00:00
registry_test.go reflect/protoregistry: add Num methods for every Range method 2019-09-05 18:06:52 +00:00
registry.go reflect/protoregistry: protect global registries with a lock 2019-10-06 03:28:52 +00:00