In Proceed(), there are three states {CREATE, PROCESS, FINISH}. In the
FINISH state, we free the memory of CallData.
However, HandleRpc() only call proceed() once,. It seems we always stay in
the PROCESS state. Will it generate the memory leak?
On Tuesday, January 26, 2016 at 4:53:38 PM UTC-8, Yang Gao wrote:
>
> You can have many pending RequestX calls as long as they have unique tags.
> When you call cq->Next(), you will get the tags back.
> Each cq->Next will block a thread. You can use one cq and call cq->Next in
> different threads.
>
>
> On Sunday, January 24, 2016 at 6:51:50 PM UTC-8, zog Lee wrote:
>>
>> 在 2015年12月17日星期四 UTC+8上午2:12:37,Yang Gao写道:
>>>
>>> In CallData constructor we call RequestSayHello with the cq and the this
>>> pointer of the CallData as the tag. This means we are asking for grpc
>>> server to give back a new SayHello rpc call on cq, and when the call comes,
>>> that tag will be returned. That is the reason why we can cast the tag we
>>> get back from the cq to a CallData. If you have another method, you need to
>>> explicitly call RequestSayGoodbye and give it a unique tag. When you get
>>> back the tag from the completion queue, you know you have a SayGoodbye call.
>>>
>>
>> so, here is my understanding:
>> RequestX likes doing "I want to listen on X request", so when
>> cq_->Next() recv the tag binding to X request, that means one X request had
>> recved by the grpc runtime, and now the logic code should do something, and
>> call Xresponder->Finish(reply, status, tag); to tell grpc runtime to send
>> status and reply to peer.
>>
>> And here is my questions:
>> Q1: If we call RequestX multiple times before the cq_Next(), what that
>> means for and what will happen when we do cq_->Next() ?
>> Q2: If we just have one cq and multiple RequestX at the same time(just
>> like the greet_async_server.cc does), how many OS threads are used to
>> execute those "CallData" ?
>> Q3: If we create multiple cq, how many OS threads are used to execute
>> those "CallData" ?
>>
>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/62c3a352-479a-4578-82f5-fe6a558e98fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.