I think, i've misunderstood the spec slightly and also checked examples 
(e.g. route_guide callback client/server). noting here for reference

to answer my question (rephrased slightly):
if one has no holds and one calls StartWrite (outside of a reactor) in an 
app thread and OnDone() is called by grpc library thread - this is 
possible... and 
from what i understand the spec __does not__ say anything about this 
situation - I mean to me not clear what happens...! 
The suggested way to avoid it in here is to add a hold before StartCall and 
remove it when onWriteDone returns not ok.  

1 thing, for me was not clear, given the spec says "the above calls may 
take place concurrently, except that `OnDone` will always take place after 
all other reactions"
what this really means is that if u are __directly reading/writing__ from 
within a reactor, u do not need holds, u need them only if you are 
reading/writing from outside of the reactor... the client_callback.h even 
states that this is __not__ an common use of streaming api...  which is a 
bit strange to me, may be i'm biased... 

thanks!

VK

On Saturday, January 8, 2022 at 8:16:44 PM UTC+1 Viktor Khristenko wrote:

> Hello,
>
> I'm using c++ callback api, specified here: 
> https://github.com/grpc/proposal/pull/180/files
>
> i have 1 question about client (in particular, but i would guess this is 
> more general) side, streaming write reactor.
>
> client streaming write reactor has these (among others) methods:
> - StartCall
> - OnDone
>
> Spec says that "No further RPC operations are permitted to be issued 
> after `OnDone` is invoked". question: What happens when you have
> - 1 thread doing StartCall on a reactor, with subsequent StartWrite
> - OnDone was called on the same reactor but from a different thread.
>
> Thanks a lot for any insight!
>
> VK
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/234df7ac-8c2e-4d68-806c-746bfa9e25c0n%40googlegroups.com.

Reply via email to