trpc-group / trpc-go

A pluggable, high-performance RPC framework written in golang
Other
743 stars 85 forks source link

perf(naming): selector and serviceroute add lock #121

Closed lbbniu closed 8 months ago

WineChord commented 8 months ago

These register and get functions have their own design principles:

Apart from the selector/servicerouter, you can also look at plugins like log. The maps operated by their register functions do not have locks.

I suggest that you could help by adding comments here to explain the correct semantics and usage of register/get, rather than adding more locks.