-
Notifications
You must be signed in to change notification settings - Fork 83
Async support #226
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
Closed
Closed
Async support #226
Conversation
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
e4eb5d5
to
f452beb
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as abuse.
This comment was marked as abuse.
bors bot
added a commit
that referenced
this pull request
Mar 15, 2023
226: Rebased Acruceru/mbedtls8 async support r=Taowyoo a=Taowyoo This is the successor of #163, except the commits in original PR. Following changes are added: - Add async tests to CI 2023-03-15 update: According to #163 (comment) Here are some to-dos in this PR: - [x] remove 'migration_mode' feature - [x] Since changing 'sign' from '&mut self' to '&self' was something that was in-progress, need to either revert to '&mut self' or check that assumption is valid. Regarding this: ```rust pub fn sign<F: Random>( &self, ``` Following two tasks could be put in another PR&issue - Performance tests (compare to 0.7 under same scenario, should give similar numbers) - Additional unit tests / run tests with valgrind. Co-authored-by: Adrian Cruceru <[email protected]> Co-authored-by: Yuxiang Cao <[email protected]>
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as outdated.
This comment was marked as outdated.
b9f94c8
to
f63b2cc
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
Taowyoo
commented
Mar 17, 2023
Revert changing `&mut self` to `&self`
9ea5265
to
2e5a225
Compare
Close thie PR since latest implementation is put in a new PR: #239 |
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 is the successor of #163, except the commits in original PR.
Old updates
Following changes are added: - Add async tests to CI2023-03-15 update:
According to #163 (comment)
Here are some to-dos in this PR:
Following two tasks could be put in another PR&issue
After this PR is merged, we could back-port it to 0.8 if needed.
Latest updates @ 2023-03-16
Notes for reviewers
Here are some explanation of implementation/changes:
Context
andIoCallback
, introduced newAsyncContext
andIoAsyncCallback
,IoAdapter
to wrap thetokio::net::TcpSteam
with combination with theIoAsyncCallback
trait to handle async functions in a synchronous context.AsyncContext
is a type alias forContext<IoAdapter<T>>
, the PR also implementedAsyncRead
&AsyncWrite
for it to make it could be used as an Async IOKey part:
IoAdapter
implementation forIoAsyncCallback
: This implementation provides the actual integration between the async I/O stream and mbedtls BIO by implementing thecall_recv_async
andcall_send_async
functions: usepoll_read
andpoll_write
oftokio::net::TcpSteam
in callback