diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-02-04 21:10:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-04 21:10:31 +0100 |
| commit | d20d09712550c820c2d67a9b3ed2a3f9debb9393 (patch) | |
| tree | f4c3ecc3ca708198a103fee5bcc6e631ee73e91c /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 822ebfd2c43fbe466da8ae34ffe3ce6cba2e8336 (diff) | |
| parent | 2c8bf1db549d1e70af53b7ff8b8afb80187827e2 (diff) | |
| download | rust-d20d09712550c820c2d67a9b3ed2a3f9debb9393.tar.gz rust-d20d09712550c820c2d67a9b3ed2a3f9debb9393.zip | |
Rollup merge of #74304 - yoshuawuyts:stabilize-wake, r=KodrAus
Stabilize the Wake trait This PR proposes stabilizing the `wake_trait` feature, tracking issue https://github.com/rust-lang/rust/issues/69912. ## Motivation The surface area this trait introduces is small, and it has been on nightly for 4 months without any reported issues. Given the surface area of this trait is small and only serves to provide a safe interface around the already stable [`std::task::RawWakerVTable`](https://doc.rust-lang.org/std/task/struct.RawWaker.html) it seems unlikely this trait will require any further changes. So I'm proposing we stabilize this. Personally I would love to have this available on stable, since it would enable cleaning up some runtime internals by removing the tedious pointer required to construct a [`RawWakerVTable`](https://doc.rust-lang.org/std/task/struct.RawWakerVTable.html). I believe the intent was always to introduce a `Wake` counterpart to `RawWaker` in order to safely construct `Waker` instances. And the `Wake` trait feels like it does that job as intended. ## Implementation notes This PR itself fixes a link in the docs, and introduces an example of how to use the trait: a minimal `block_on` example that runs a future to completion on the current thread. It doesn't include fancier features such as support for nesting, but is intended to serve as a teaching device for both `task::Wake` and futures alike.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
