-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
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 RFCF-context_ext`#![feature(context_ext)]``#![feature(context_ext)]`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
Description
Feature gate: #![feature(context_ext)]
This is a tracking issue for allowing std::task::Context
to carry arbitrary extension data.
Public API
impl Context {
fn ext(&mut self) -> &mut dyn Any;
}
impl ContextBuilder {
fn ext(self, data: &'a mut dyn Any) -> Self;
fn from(cx: &'a mut Context<'_>) -> Self;
fn waker(self, waker: &'a Waker) -> Self;
}
Steps / History
- Implementation: Add
Context::ext
#123203 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- passing refs maybe unsound
- too complex
- This causes Context to no longer be UnwindSafe, which may be a breaking change: regression: the type
(dyn Any + 'static)
may contain interior mutability #125193 (the issue is closed but there still is a FIXME in the code)
Footnotes
broadwaylamb, surban, anatawa12 and teor2345
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 RFCF-context_ext`#![feature(context_ext)]``#![feature(context_ext)]`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