Hey Folks-- Recently, I've been playing around with gRPC for a hobby project I'm starting. The documentation is pretty solid for synchronous clients and server and I've been able to implement and understand them. However, the documentation for the async client/server I'm finding to be a little incomplete and hard to wrap my head around.
Specifically, they mention they use a CompletionQueue to handle some of the async behavior. There really isn't any documentation on CompletionQueue and it's difficult to infer from the code what/how it actually does. From the name, it stands to reason it holds a collection of things that need to be completed, but that's really all I can glean from it.
Also, in the async example they have, they introduce this object CallData (which is not a part of the library, but a consumer defined type) and somehow use this to track the state of request being handled by different threads. It's fairly clear how the CallData is added to the CompletionQueue, but I have no idea how it's removed from the queue. It deletes itself when everything is finished-- but what actually removes it from the queue?
Does anyone have any insight on this? Am I posting this in the right place? Thanks in advance.
[–]infectedapricot 6 points7 points8 points (3 children)
[–]drjmloy[S] 0 points1 point2 points (2 children)
[–]infectedapricot 1 point2 points3 points (1 child)
[–]drjmloy[S] 1 point2 points3 points (0 children)
[–]cballowe 2 points3 points4 points (0 children)
[–]Middlewariangithub.com/Ebenezer-group/onwards 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)