-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-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 RFCT-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.
Description
Feature gate: #![feature(poll_ready)]
This is a tracking issue for the core::task::Poll::ready
method, which combined with ?
potentially supplants the ready!
macro of #70922.
- let val = ready!(fut.poll(cx));
+ let val = fut.poll(cx).ready()?;
Public API
// core::task
impl<T> Poll<T> {
pub fn ready(self) -> Ready<T>;
}
pub struct Ready<T> {...}
impl<T> Try for Ready<T> {
type Output = T;
type Residual = Ready<Infallible>;
...
}
impl<T> FromResidual for Ready<T> {...}
impl<T> FromResidual<Ready<Infallible>> for Poll<T> {...}
impl<T> Debug for Ready<T> {...}
Steps / History
- Add
Poll::ready
and revert stabilization oftask::ready!
#89651 - Remove unstable
Poll::ready
libs-team#214 - Remove unstable
Poll::ready
#107060
Unresolved Questions
- ?
zeenix, estebank, yuyoyuppe, songzhi, Jonathas-Conceicao and 4 moreyoshuawuyts, Jonathas-Conceicao, robjtede and Kobzolyoshuawuyts, Jonathas-Conceicao, robjtede, Kobzol and Xuanwo
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-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 RFCT-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.