Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Channels page #47

Merged
merged 13 commits into from
Jun 22, 2020
Merged

Channels page #47

merged 13 commits into from
Jun 22, 2020

Conversation

carllerche
Copy link
Member

No description provided.

@carllerche
Copy link
Member Author

@Darksonn I am updating things to use an enum over the channel: https://github.com/tokio-rs/website-next/pull/47/files#diff-f33399dccf850e6da8211133469c97b2R5

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

There are some files without a newline at the end that show up with a red thingy in GitHub.

content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
@carllerche
Copy link
Member Author

@Darksonn I ran cargo fmt.

[dependencies]
tokio = { version = "0.2", features = ["full"] }
bytes = "0.5"
mini-redis = { path = "/home/carllerche/Code/tokio-mini-redis" }
Copy link
Member Author

Choose a reason for hiding this comment

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

Seems like fmt doesn't run on Cargo.toml

@carllerche carllerche changed the title WIP: channels page Channels page Jun 21, 2020
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
content/tokio/tutorial/channels.md Outdated Show resolved Hide resolved
Comment on lines +340 to +344
```rust
loop {
async_op();
}
```
Copy link
Contributor

Choose a reason for hiding this comment

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

I think something should be changed with this example, but I am not sure what exactly. Perhaps something with a tokio::spawn?

Choose a reason for hiding this comment

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

+1. I think while mentioning the needs to limit concurrency is great and very important, this thing is rather weird. I think it's coming out of 2 things:

  • There is no visible concurrency. It's just an endless loop.
  • The whole thing might only make sense if something around it does synchronous cancellation - which is yet another orthogonal concept.

Maybe just show limiting of concurrency via an async semaphore in a function? Or a bounded channel?

Copy link
Member Author

Choose a reason for hiding this comment

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

The thing I'm trying to call out is, w/ other styles of async (javascript's closures, java's eager fuutres, ...) doing a loop like that will end up just queuing implicitly.

I'm trying to call this out for those who have context. I don't think I did a great job though.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think this issue should block merging the page. We can either remove the section for now or track the problem in an issue.

@carllerche
Copy link
Member Author

I'm going to merge. The outstanding issue is tracked in #49

@carllerche carllerche merged commit 349b8c3 into master Jun 22, 2020
@Darksonn Darksonn deleted the channels branch July 8, 2020 21:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants