Hi Alex,
This currently isn't well-supported. gRPC does some asynchronous work in the background even after all application-owned objects have been destroyed. Today, there is no way for an application to wait for gRPC to be shut down. Some work needs to be done internally to support a wait-for-shutdown API, and some of that work is being done today.
Your best way forward is to leave gRPC loaded until your process exits.
Best,
-aj