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

doc: fix a few broken links by using rustdoc #2400

Merged
merged 7 commits into from Apr 13, 2020
Merged

doc: fix a few broken links by using rustdoc #2400

merged 7 commits into from Apr 13, 2020

Conversation

ghost
Copy link

@ghost ghost commented Apr 13, 2020

Also, the link for driver is removed because driver is now pub(crate), so can't be used in docs.

Motivation

Make doc's links more resistant.

Solution

Delagates doc's links resolution to rustdoc.

Refs: #1473

@ghost ghost mentioned this pull request Apr 13, 2020
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.

These changes look good to me.

@ghost
Copy link
Author

ghost commented Apr 13, 2020

Any idea how to rephrase this

The DelayQueue is backed by the same hashed timing wheel implementation as Timer as such, it offers the same performance benefits. See Timer for further implementation notes.

in https://docs.rs/tokio/0.2.18/tokio/time/struct.DelayQueue.html#implementation

since according to

git log 27e5b41067d01c0c9fac230c5addb58034201a63`
  • tokio::timer::Timer is renamed to Driver and made private.

@Darksonn
Copy link
Contributor

How about this? This leaves it a bit more ambiguous, but that's fine for now.

The DelayQueue is backed by a separate instance of the same timer wheel used internally by Tokio's standalone timer utilities such as delay_for. Because of this, it offers the same performance and scalability benefits.

State associated with each entry is stored in a slab. This amortizes the cost of allocation, and allows reuse of the memory allocated for expired entires.

I also changed a sentence in the following paragraph that I thought was a bit awkward.

@ghost
Copy link
Author

ghost commented Apr 13, 2020

How about this?

Sounds good, though i'm still learning Tokio, so i don't feel like authority here.
So should I simply use it or we're waiting for others opinions?

@Darksonn
Copy link
Contributor

Just go for it. We can always change it later if someone thinks it should be changed.

@Darksonn
Copy link
Contributor

Can you merge Tokio's master branch? That should fix the FreeBSD ci.

@ghost
Copy link
Author

ghost commented Apr 13, 2020

Can you merge Tokio's master branch? That should fix the FreeBSD ci.

sure, done

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.

This looks good. Do you have any other parts of the doc you want to change, or is this ready to merge?

@ghost
Copy link
Author

ghost commented Apr 13, 2020

Do you have any other parts of the doc you want to change, or is this ready to merge?

In short
ready to merge

In long
In next step I'll replace methods, but this needs a change in rustdoc.
After rustdoc is changed, I'll create a new MR with updated methods, ok?
See step 2 in #1473 (comment)

@Darksonn Darksonn merged commit 9553355 into tokio-rs:master Apr 13, 2020
@Darksonn Darksonn added A-tokio Area: The main tokio crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. T-docs Topic: documentation labels Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant