gRPC Cancellation Token

Skip to first unread message

Ahmet Yılmaz

Sep 22, 2023, 4:12:55 AM9/22/23
Hello Everyone,

Im working grpc server client project on c++, Im trying to cancel server rpc with a request from client, but I didn't    How can I cancel server rpc  from client side ? 

Best regards

Sanjay Pujare

Sep 22, 2023, 6:49:54 PM9/22/23
to Ahmet Yılmaz,
Use context.TryCancel() as described in

You received this message because you are subscribed to the Google Groups "" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Ahmet Yılmaz

Sep 25, 2023, 11:21:09 AM9/25/23
hello again,
What I'm really curious about is that when I use the context.IsCanceled() method in the asynchronous server stream application to receive the cancel request on the server side, not the TryCancel method, the program terminates with a segmentation fault error. If I need to give more details, I write in C# on the client side, and on the server side, I can send a cancellation token from the client in C++, but I could not find an example code or implementation of this in C++, can you help me on how to do it on the server?
thanks best regards. 
Reply all
Reply to author
0 new messages