Tracking Issue for feature(coroutine_clone) #95360
Labels
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
F-coroutine_clone
`#![feature(coroutine_clone)]`
S-tracking-impl-incomplete
Status: The implementation is incomplete.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
This is the tracking issue for
#[feature(coroutine_clone)]
.This feature extends RFC #2132 to allow non-
static
coroutines to implementClone
/Copy
if all their captured variables and all local variables which are held across a yield implementClone
/Copy
. For instance, we can now write code like this:This also works if the coroutine captures
Clone
data:But not if the Coroutine is
static
or contains non-clonable state.Since this feature does not allow
static
coroutines to be cloned it does not apply to anonymous futures created usingasync
blocks/functions (since these are desugared tostatic
coroutines). Allowing these futures to be clonable is an extension worth considering but is outside the scope of this feature.About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
Unresolved Questions
yield
multiple times. This is a non-trivial extension of coroutine semantics, with consequences for MIR analyses and correctness reasoning. Let's make sure to properly discuss and explore the consequences of this before stabilizing anything.Implementation history
The text was updated successfully, but these errors were encountered: