MySQL 8.0.39
Source Code Documentation
The Service Registry Service

The Service Registry is a central part of Components subsystem.

It maintains a list of the Service Implementations and allow acquiring them by any actor that has a reference to main Registry Service Implementation. For each Service a reference counter is maintained to make sure no one can remove any Service Implementation being actively used. The Service Implementations can be acquired by the Service name or by the full Service Implementation name. For each Service a default Service Implementation is distinguished, the first one to be added, but it is possible to change it at will at any point.

A convenient RAII-style wrapper on Service acquisition and automatic release is provided, the my_service<T> class.