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
Serve
itself 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
,Arc
instead ofRefCell
,Rc
.