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

migrate to tokio 0.3 #41

Closed
wants to merge 1 commit into from
Closed

migrate to tokio 0.3 #41

wants to merge 1 commit into from

Conversation

jadamcrain
Copy link
Member

Biggest change seemed to be that Runtime no longer has a public Handle type, so for the FFI I effectively created
one and used that as the external "Runtime" type that gets passed around by pointer.

// pub use tokio::runtime::Runtime;
use std::sync::Arc;

#[derive(Clone)]
pub struct Runtime {
    pub(crate) inner: Arc<tokio::runtime::Runtime>
}

Other notables changes:

  • tcp -> net
  • new annotations for tokio-main runtime "flavor"
  • delay_for/delay_until -> sleep/sleep_until

@emgre
Copy link
Contributor

emgre commented Nov 6, 2020

Let's wait for tokio-rs/tokio#2965 to be fixed. There's already tokio-rs/tokio#3076 merged in master, but we also need tokio-rs/tokio#3097. Having a Arc<Runtime> removes the when-I-delete-the-runtime-everything-gets-shutdown behaviour that we had in 0.2.

@jadamcrain jadamcrain closed this Jul 12, 2021
@jadamcrain jadamcrain deleted the feature/tokio-0.3 branch July 12, 2021 18:06
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.

2 participants