Let Serve and Stub traits be send#475
Closed
stevefan1999-personal wants to merge 1 commit intogoogle:masterfrom
Closed
Let Serve and Stub traits be send#475stevefan1999-personal wants to merge 1 commit intogoogle:masterfrom
stevefan1999-personal wants to merge 1 commit intogoogle:masterfrom
Conversation
Collaborator
|
Thank you for the PR! Unfortunately, I don't think it is true that nobody uses this without multithreading, so I can't merge a change that would make |
Contributor
Author
But the point is, since tarpc is heavily Tokio dependent, which is under the assumption of |
Contributor
Author
|
Closing in favor of #480 |
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.
This PR address a problem to revive the service registry code of the following:
Effectively, this registry code will serialize/deserialize any request/response code with Serde and a codec of your choice, which requires a self-descripted format and will get unintended consequences if otherwise (thus using Bincode is actually unsafe), and then just send it over the wire as usual, but the biggest problem is that
Serveitself has no guarantee of Send, so I hacked the code together and eventually got it working.This PR will make #448 obsolete with a better approach. After this PR is merged I will try to see if I can polish up the registry code.
I admit this can introduce some breaking changes -- But given the fact that nobody is using this without multithreaded async, and I assumed everyone would be very aware of async safety using standard primitives like
Mutex,Arcinstead ofRefCell,Rc.