I can imagine a hundred scenarios where '
delete this;' at the end of the CallData state machine is never reached.
How about, if we simply start the server and shut it down without any RPC calls? proceed would never be called three times, and therefore the delete is never reached.
In fact, it seems to me there is always at least one outstanding instance that will never have proceed called again on server shutdown.
Additionally, if any exception were to occur during processing, it would be lost forever.
Trying to sort this out while not understanding grpc and trying to make sense of it, itself, makes this example absolutely horrid. Is there not any better examples out there? Can someone with understanding contribute a few? How to get gRPC Async and Async Streaming are a complete mystery to me.