fix: CompletionQueue::RunAsync is always async - #4448
Merged
Conversation
Prior to this change we sometimes ran the callable passed to `CompletionQueue::RunAsync()` in the calling thread and not in the thread pool, which was hard to reason about. As part of these changes I also fixed the code to support move-only callables, and added a test for it. The code is "future proofed" to support a `void()` callable. Which is interesting for a number of reasons (think "executors").
coryan
marked this pull request as ready for review
June 30, 2020 17:01
devbww
approved these changes
Jul 1, 2020
Codecov Report
@@ Coverage Diff @@
## master #4448 +/- ##
==========================================
- Coverage 92.60% 92.49% -0.12%
==========================================
Files 880 880
Lines 68262 68320 +58
==========================================
- Hits 63215 63193 -22
- Misses 5047 5127 +80
Continue to review full report at Codecov.
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prior to this change we sometimes ran the callable passed to
CompletionQueue::RunAsync()in the calling thread and notin the thread pool, which was hard to reason about.
As part of these changes I also fixed the code to support
move-only callables, and added a test for it.
The code is "future proofed" to support a
void()callable.Which is interesting for a number of reasons (think "executors").
Fixes #4083
This change is