-
Notifications
You must be signed in to change notification settings - Fork 11
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
Dev/sol/tokio #433
Dev/sol/tokio #433
Conversation
8c66516
to
46fc130
Compare
46fc130
to
7cc6037
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thanks!
7cc6037
to
59f621a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After trying this out and then debugging for a long time, I found out that we cannot use std::hint::spin_loop
in combination with tokio
. I cannot say what the underlying problem is. Using the two in combination leads to random deadlocks. Replacing std::hint::spin_loop
with tokio::task::yield_now().await
works.
The explanation is probably this: As soon as the scheduler enters the loop, there is no way for it to exit it. Since the scheduler here is the tokio scheduler, it will only pause a task, if the task itself reports, that it can be paused. Pausing here here just means awaiting a future. In your implementation this works correctly, since now the scheduler gets the chance to resume other tasks. I am not sure what you changed, maybe we should have a look together at this change, and what other ideas I have here. |
59f621a
to
44c793b
Compare
Adds two new dependencies: * tokio * tokio_utils We want to remove async-std, since it is no longer maintained.
We want to remove async-std, since it is no longer maintained.
We want to remove async-std, since it is no longer maintained.
We want to remove async-std, since it is no longer maintained.
We want to remove async-std, since it is no longer maintained.
We want to remove async-std, since it is no longer maintained.
`futures` is no longer needed, because of the addition of tokio. We want to remove async-std, since it is no longer maintained.
44c793b
to
82e6635
Compare
WIP