Skip to content
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

Update to Tokio 1.0 #628

Merged
merged 8 commits into from
Jul 7, 2021
Merged

Update to Tokio 1.0 #628

merged 8 commits into from
Jul 7, 2021

Conversation

Xanewok
Copy link
Contributor

@Xanewok Xanewok commented Jun 29, 2021

Needs paritytech/parity-tokio-ipc#32 (pulls a [patch.crates-io] in the meantime).

Closes #621

Primary motivation is to fix RLS build on aarch64 Windows (see rust-lang/rls#1741). Tested locally on a Windows machine, hopefully unix will be happy as well.

https://tokio.rs/blog/2020-10-tokio-0-3 might be useful when reviewing

@Xanewok Xanewok requested review from tomusdrw and seunlanlege June 29, 2021 22:43
@Xanewok Xanewok mentioned this pull request Jun 29, 2021
2 tasks
@seunlanlege
Copy link
Contributor

just needs to fix CI build errors

Copy link
Member

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one question about the server feature for the http client

@Xanewok Xanewok changed the title WIP: Update to Tokio 1.0 Update to Tokio 1.0 Jul 6, 2021
@Xanewok
Copy link
Contributor Author

Xanewok commented Jul 6, 2021

Added some more commits since the last review. Can I get a final rubber-stamp before merging this?

server-utils/src/suspendable_stream.rs Outdated Show resolved Hide resolved
futures::pin_mut!(sleep);
match sleep.poll(cx) {
Poll::Pending => return Poll::Pending,
Poll::Ready(()) => {}
Poll::Ready(()) => {
self.suspended_until = None;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're ready then let's reset the suspension flag not to execute that code path everytime

@Xanewok
Copy link
Contributor Author

Xanewok commented Jul 7, 2021

Thanks for the reviews!

Would it be possible to release new versions of the crates somewhat soon that contain this PR?

@Xanewok Xanewok merged commit ac72c85 into master Jul 7, 2021
@Xanewok Xanewok deleted the igor-tokio-1.0 branch July 7, 2021 15:19
@tomusdrw
Copy link
Contributor

tomusdrw commented Jul 7, 2021

Would it be possible to release new versions of the crates somewhat soon that contain this PR?

I guess we should bump the version first. I guess 18.x ?

@Xanewok
Copy link
Contributor Author

Xanewok commented Jul 8, 2021

Yep, sounds good. I'll prepare a bump PR if that's okay

@Xanewok Xanewok mentioned this pull request Jul 8, 2021
bors added a commit to rust-lang/rls that referenced this pull request Aug 24, 2021
Bump to Tokio 1.0

Closes #1695
Closes #1693

Just enabled by tokio-rs/tokio#3388.

Work in progress to prune winapi 0.2, still needs patches upstreamed that migrate `parity-tokio-ipc` and `jsonrpc-*` crates to Tokio 1.0. Let's see what CI has to say, first.

Blocked on:
- [x] paritytech/parity-tokio-ipc#32
- [x] paritytech/jsonrpc#628
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade tokio to 1.x
4 participants