stub: remove interrupt checking from ThreadSafeThreadlessExecutor.drain (1.76.x backport)#12391
Closed
ejona86 wants to merge 1 commit intogrpc:v1.76.xfrom
Closed
stub: remove interrupt checking from ThreadSafeThreadlessExecutor.drain (1.76.x backport)#12391ejona86 wants to merge 1 commit intogrpc:v1.76.xfrom
ejona86 wants to merge 1 commit intogrpc:v1.76.xfrom
Conversation
…in (grpc#12358) The only caller of `drain()` just reset the interrupt flag. So, we can avoid the whole exception dance.
Contributor
|
Why the backport? I don't think this fixes any bugs. |
Member
Author
|
There's actually a behavior change, of whether the executor runs or not, not just avoiding creating the exception. And it seemed getting any such changes out sooner is probably better for all new stub users. We can let it sit for the next release though. I guess you just saw the inefficiency and decided to improve that, which really doesn't need to be backported. |
Contributor
|
As far as I can tell, I made this change as prefactoring for the change I'm really interested in: #12372 |
Member
Author
|
Oh, I see. I thought some of those methods were used elsewhere. Yeah, there's no point to this backport. (And I agree #12372 is important). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The only caller of
drain()just reset the interrupt flag. So, we can avoid the whole exception dance.Backport of #12358
CC @benjaminp, FYI