Closed
Description
Feature gate: #![feature(noop_waker)]
This is a tracking issue for task::Waker::noop
, a way to easily crate task::Waker
s that do nothing.
Public API
// core::task
impl Waker {
#[must_use]
pub const fn noop() -> &Waker { /* … */ }
}
Steps / History
- Implementation: Add
task::Waker::noop
#96875 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Should we also add
RawWaker::noop()
? (I don't think so, I can't think of a use case for it) - Should we also add
Context::noop()
? Depending on the directionContext
goes a “noop context” might not even make sense in future. Should it be an associated constant instead? That would allow forlet cx = &mut Context::from_waker(&Waker::NOOP);
to work on one line (without additional local variables) which is convenient.- The return type of
Waker::noop()
has now been changed to&Waker
.
- The return type of
Metadata
Metadata
Assignees
Labels
Async-await issues that have been triaged during a working group meeting.Category: An issue tracking the progress of sth. like the implementation of an RFCNominated for discussion during an async working group meeting.Relevant to the library API team, which will review and decide on the PR/issue.Working group: Async & await