-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix helloworld tutorial. #546
Fix helloworld tutorial. #546
Conversation
examples/helloworld-tutorial.md
Outdated
@@ -179,7 +179,7 @@ impl Greeter for MyGreeter { | |||
Finally, let's define the Tokio runtime that our server will actually run on. This requires Tokio to be added as a dependency, so make sure you included that! | |||
|
|||
```rust | |||
#[tokio::main] | |||
#[tokio::main(flavor = "current_thread")] |
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.
It would probably better to use the multithreaded runtime by adding the feature and removing these flavor changes.
examples/helloworld-tutorial.md
Outdated
@@ -115,7 +115,7 @@ path = "src/client.rs" | |||
[dependencies] | |||
tonic = "0.4" | |||
prost = "0.7" | |||
tokio = { version = "0.2", features = ["macros"] } | |||
tokio = { version = "1.0", features = ["macros"] } |
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.
tokio = { version = "1.0", features = ["macros"] } | |
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } |
updated tutorial to use tokio 1.x.
f7a10c4
to
bd59497
Compare
@olix0r Thank for review! |
Motivation
I got a error when trying to run helloworld tutorial
because tonic 0.4 currently depends on Tokio 1.x.
Solution
updated example to use Tokio 1.x.