You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a tracking issue for the Wake trait.
The feature gate for the issue is #![feature(wake_trait)].
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also uses as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
This is mostly a useful helper to enable people to safely author Waker impls through, which is useful during testing, teaching, and when you only have a single callback that needs to be called when woken.
Reacted by Gurwinder Singh, memoryruins, Mikail Bagishov, Charles Eckman, Febby, Michael Leonhard and 1 more
Activity
yoshuawuyts commentedon Jul 13, 2020
Filed a stabilization PR: #74304
yoshuawuyts commentedon Jul 19, 2020
These are the uses the
Waketrait will replace:RawWakerwith raw pointers can be confusing for people learning about futures.Wakemakes this safe and easier to follow.waker-fncrate andwakefulcrates that provide awaker_fnfunction to easily create a waker from a closure. Example use in theblockingcrate.Waketrait that has the same shape and use ascore::task::Wake(src)rustc, example fromevent-listener.This is mostly a useful helper to enable people to safely author
Wakerimpls through, which is useful during testing, teaching, and when you only have a single callback that needs to be called when woken.taiki-e commentedon Sep 25, 2020
@yoshuawuyts
I believe
futures::task::ArcWakeshould be added to that list.Rollup merge of rust-lang#74304 - yoshuawuyts:stabilize-wake, r=KodrAus
Rollup merge of rust-lang#74304 - yoshuawuyts:stabilize-wake, r=KodrAus
memoryruins commentedon Apr 23, 2021
The
Waketrait was stabilized in #74304 and is now on stable rustc1.51.0.Thanks everyone who helped see this through!