c++ Callback API
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…
Read more here: Source link