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

add now_or_never #32

Open
dvc94ch opened this issue Dec 1, 2020 · 3 comments
Open

add now_or_never #32

dvc94ch opened this issue Dec 1, 2020 · 3 comments

Comments

@dvc94ch
Copy link

dvc94ch commented Dec 1, 2020

this has stopped me from using futures-lite a couple of times now. incredibly useful function.

@Kestrer
Copy link

Kestrer commented Dec 26, 2020

It currently exists as futures_lite::future::poll_once, although it's not a method like .now_or_never().

@dvc94ch
Copy link
Author

dvc94ch commented Dec 26, 2020

No, that's not the same. It requires you to construct a waker, and if you look at the futures NoopWaker it's about 200loc.

@Kestrer
Copy link

Kestrer commented Dec 26, 2020

Oh, sorry, I didn't realize. But it can still be useful when you are already in an async context, which is often the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants