-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-async-nominatedNominated for discussion during an async working group meeting.Nominated for discussion during an async working group meeting.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.WG-asyncWorking group: Async & awaitWorking group: Async & await
Milestone
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
tower120, zachs18 and stepancheg
Metadata
Metadata
Assignees
Labels
AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-async-nominatedNominated for discussion during an async working group meeting.Nominated for discussion during an async working group meeting.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.WG-asyncWorking group: Async & awaitWorking group: Async & await