[grpc-c++] About the destruction order in bidistream (Context and AsyncReaderWriter)

46 views
Skip to first unread message

yihao yang

unread,
Sep 7, 2017, 1:59:47 PM9/7/17
to grpc.io
Hi, all,

I have a question about the destruction order:
1. For ClientContext and ClientAsyncReaderWriter. Which one should be destructed first when exit?
1. For ServerContext and ServerAsyncReaderWriter. Which one should be destructed first when exit?

Any one can help me ?

Thanks,
Yihao

Yang Gao

unread,
Sep 29, 2017, 2:19:17 AM9/29/17
to grpc.io
If your stream is finished, either way should be fine.
To be on the safe side, destroy the reader/writer objects first and Client/ServerContext afterwards.
Reply all
Reply to author
Forward
0 new messages