There is an example in the grpc directory:
Instead of calling the blocking Wait, we sleep on the main thread until the signal interruption calls Shutdown. Does the job f
Wait
Shutdown