Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JsonRpc.DispatchCompletion property #467

Merged
merged 1 commit into from
May 28, 2020
Merged

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented May 20, 2020

This property returns a Task which completes whenever there are no local RPC methods currently running.
This allows shutdown code to not only wait for disconnection, but also for any trailing local RPC methods to finish running, if any.

Closes #466

This property returns a Task which completes whenever there are no local RPC methods currently running.
This allows shutdown code to not only wait for disconnection, but also for any trailing local RPC methods to finish running, if any.

Closes microsoft#466
@AArnott AArnott added this to the v2.5 milestone May 20, 2020
@AArnott AArnott self-assigned this May 20, 2020
@codecov-commenter
Copy link

codecov-commenter commented May 20, 2020

Codecov Report

Merging #467 into master will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #467      +/-   ##
==========================================
+ Coverage   90.37%   90.45%   +0.08%     
==========================================
  Files          50       50              
  Lines        3812     3823      +11     
==========================================
+ Hits         3445     3458      +13     
+ Misses        367      365       -2     
Impacted Files Coverage Δ
src/StreamJsonRpc/JsonRpc.cs 93.40% <100.00%> (+0.42%) ⬆️
...pc/Reflection/MessageFormatterDuplexPipeTracker.cs 94.11% <0.00%> (-1.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef2a5d8...c663b78. Read the comment docs.

@jlorich
Copy link

jlorich commented May 20, 2020

👍 Looks good from me end. await _jsonRpc.Completion + await _jsonRpc.DispatchCompletion will let me safely hold the function until everything is wrapped up.

Thanks for the incredibly quick response on this!

Copy link

@kzu kzu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very useful feature 💯

@AArnott AArnott merged commit 7bba74b into microsoft:master May 28, 2020
@AArnott AArnott deleted the fix466 branch May 28, 2020 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Technique for waiting for work to complete?
4 participants