You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to prepare for the async interface, one part of the whole library is the RpcContinuationQueue. With the current implementation we can not support async waiting on completion.
=> I propose to use a IValueTaskSource and create a class that handles this.
This way we could set the reply with one method and have another which you could use to wait.
With this implementation we can avoid a lot of allocations for an RPC await.
I have a very basic working prototype up and running locally.
If the extended functionality (timeout, shutdown) is fully implmented and working, I'll set up a PR for the current sync API with GetReplyAsync().AsTask.GetAwaiter().GetResult(). in every public API. => Async under the hood, so we'd ready to switch.
The text was updated successfully, but these errors were encountered:
michaelklishin
changed the title
7.0 Proposal (internal): Use IValueTaskSource for RPC continuations awaits
8.0 Proposal (internal): Use IValueTaskSource for RPC continuations awaits
Nov 6, 2020
I believe that the AsyncRpcContinuation class and subclasses effectively implement this suggestion.
They are TaskCompletionSource based which does allocate where IValueTaskSource doesn't. It's not a huge issue though and something I can look at later.
In order to prepare for the async interface, one part of the whole library is the RpcContinuationQueue. With the current implementation we can not support async waiting on completion.
=> I propose to use a IValueTaskSource and create a class that handles this.
This way we could set the reply with one method and have another which you could use to wait.
instead of the current (used my latest branch to experiment)
With this implementation we can avoid a lot of allocations for an RPC await.
I have a very basic working prototype up and running locally.
If the extended functionality (timeout, shutdown) is fully implmented and working, I'll set up a PR for the current sync API with
GetReplyAsync().AsTask.GetAwaiter().GetResult().
in every public API. => Async under the hood, so we'd ready to switch.The text was updated successfully, but these errors were encountered: