-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.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.
Description
Feature gate: #![feature(waker_fn)]
This is a tracking issue for rust-lang/libs-team#702.
Public API
pub fn waker_fn<F: Fn() + Send + Sync + 'static>(f: F) -> Waker {
Waker::from(Arc::new(WakeFn(f)))
}
struct WakeFn<F> {
f: F,
}
impl<F> Wake for WakeFn<F>
where F: Fn()
{
fn wake(self: Arc<Self>) { (self.f)() }
fn wake_by_ref(self: &Arc<Self>) { (self.f)() }
}Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
- ACP: ACP: Add
wake_fntoalloc::tasklibs-team#702 - Implementation: Add waker_fn and local_waker_fn to std::task #149976
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.
Footnotes
Metadata
Metadata
Assignees
Labels
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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.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.