strawpoll

Crates.iostrawpoll
lib.rsstrawpoll
version0.2.3
sourcesrc
created_at2020-02-04 19:23:03.088407
updated_at2023-01-14 22:36:04.459922
descriptionA wrapper to avoid spurious polling.
homepage
repositoryhttps://github.com/jonhoo/strawpoll.git
max_upload_size
id204937
size33,109
Jon Gjengset (jonhoo)

documentation

README

Crates.io Documentation Codecov


Strawpoll — a wrapper to avoid spurious polling.

Sometimes, you have a future that itself contains smaller futures. When the larger future is polled, it polls those child futures to see if any of them have made progress. This can be inefficient if polling such a future is expensive; when the big future is woken up, it is usually because one of its child futures was notified, and ideally only that one future should be polled. Polling the other child futures that were not notified is wasting precious cycles. This crate provides a wrapper for Future types, and other types that you may wish to call poll-like methods on that avoids such spurious calls to poll.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 94

cargo fmt