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

DelayQueue::len #1755

Merged
merged 1 commit into from
Dec 22, 2019
Merged

DelayQueue::len #1755

merged 1 commit into from
Dec 22, 2019

Conversation

rubdos
Copy link
Contributor

@rubdos rubdos commented Nov 8, 2019

Motivation

Some commits for unimplemented things in the DelayQueue.

Solution

Add a DelayQueue::len()

Sometimes it's useful to keep track of how many items we still have in the queue.

Implement FusedStream for DelayQueue

I'm not sure that this is a correct implementation, cfr #1754, and I'll gladly change the commit to reflect any other needed change. Change removed

@carllerche
Copy link
Member

Sorry for the delay. We have been busy! Could you merge master?

Also, could you limit the Pr to the len fn? How to handle Fused is not figured out yet. Once we do, we can update everything across Tokio.

@rubdos
Copy link
Contributor Author

rubdos commented Dec 2, 2019

Force-pushed a rebased version without FusedStream! Would you mind opening a tracking issue for Fused, linking it here?

@carllerche
Copy link
Member

woops, looks like somehow CI isn't passing. I will open an issue.

@carllerche
Copy link
Member

Issue is #1895

@carllerche
Copy link
Member

The PR looks good, the doc example needs to be updated to pass CI 👍

@rubdos
Copy link
Contributor Author

rubdos commented Dec 10, 2019

Give me a few days to fix this, I have some hardware issues atm.

@rubdos
Copy link
Contributor Author

rubdos commented Dec 16, 2019

Sorry that it took some time; this one is actually tested and should™ pass CI :-)

@rubdos rubdos changed the title Delay queue DelayQueue::len Dec 18, 2019
Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@carllerche carllerche merged commit 0133bc1 into tokio-rs:master Dec 22, 2019
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.

None yet

2 participants