Remove redundant work serializer usage in c-ares windows code #28016
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.
This is extracted from the changes to c-ares windows code in https://github.com/grpc/grpc/pull/27858/files.
I'm not 100% sure why we were explicitly scheduling these methods on the work serializer when we were already running under it.
I think it's because these methods were originally added back in 03797e0, which was before the change to use
WorkSerializer
s in e05417d#diff-22089b08a43cdad7a2fcf577721907568fe29a57024bf600d137c69996fed567. In the former PR, thepending_continue_register_for_on_{readable,writable}_locked_
fields were pointers to closures, and code would schedule their underlying closures on the combiner, even if we were already running under the combiner. The change to use work serializer also changed these fields from pointers to booleans, and also changed code to explicitly schedule their methods on the work serializer in the case these flags were set. But, explicitly scheduling on the work serializer remained redundant.