added a _cancelled flag for the client call to track if the call was cancelled #360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix for #345 #354
When we have multiple streaming calls doing read operations in parallel and we cancel those calls, some of the calls will complete with correct error status(as they finished reading the stream and the subsequent reads are not valid) and some calls might hang as they are waiting on occurrence to get signaled from async c++ thread.
When we cancelled the calls, they get removed form ActiveCalls list. Once we complete any read in async C++ thread, we always signal the occurrence corresponding to calls present in this active call list only. But if the call was cancelled, it will get removed this list and we will end up not signaling for it and VI will hang in Wait for occurrence.
To fix this added a
_cancelled
flag inClientCall
to keep track if the call was cancelled. If cancelled that async ++ thread will signal occurrence now.Note: I want to add one LV client server test for this but I have to add some infrastructure to do that in existing ATS.