Skip to content

Stream::delay #309

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 8 commits into from
Nov 30, 2019
Merged

Stream::delay #309

merged 8 commits into from
Nov 30, 2019

Conversation

yoshuawuyts
Copy link
Contributor

Depends on #298. Adds Stream::delay which delays the initial yield of a stream by dur. This is useful when you want to pass a stream that needs to sleep for a while, rather than instruct people to call task::sleep. Also makes for some nice demos of how streamlined Rust can be, which I think is valuable.

Marked as unstable. Thanks!

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
@yoshuawuyts yoshuawuyts added the enhancement New feature or request label Oct 13, 2019
@yoshuawuyts yoshuawuyts mentioned this pull request Oct 15, 2019
@k-nasa
Copy link
Member

k-nasa commented Nov 20, 2019

@yoshuawuyts You are a busy person. If I still need this feature, will I continue?
Apparently it is almost complete

@yoshuawuyts
Copy link
Contributor Author

@k-nasa please do!

@k-nasa k-nasa marked this pull request as ready for review November 28, 2019 06:54
@k-nasa k-nasa requested a review from a user November 28, 2019 06:56
@k-nasa
Copy link
Member

k-nasa commented Nov 28, 2019

@yoshuawuyts I implemented this!
Please review this PR.

@yoshuawuyts
Copy link
Contributor Author

@k-nasa this patch looks 💯. I can't sign off on it through the GitHub UI because I started it. But think it should be good to merge — just had one question.

@yoshuawuyts yoshuawuyts merged commit d51a135 into master Nov 30, 2019
@yoshuawuyts yoshuawuyts deleted the stream-delay branch November 30, 2019 02:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants