Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking Issue for task::Waker::update #98287

Closed
3 tasks
SabrinaJewson opened this issue Jun 20, 2022 · 1 comment
Closed
3 tasks

Tracking Issue for task::Waker::update #98287

SabrinaJewson opened this issue Jun 20, 2022 · 1 comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@SabrinaJewson
Copy link
Contributor

Feature gate: #![feature(waker_update)]

This is a tracking issue for task::Waker::update, a shortcut function for replacing a waker while avoiding unnecessary clones (via will_wake).

Public API

// core::task

impl Waker {
    pub fn update(&mut self, other: &Waker);
}

Steps / History

Unresolved Questions

  • None yet.
@SabrinaJewson SabrinaJewson added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jun 20, 2022
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 5, 2023
…jubilee

Override `Waker::clone_from` to avoid cloning `Waker`s unnecessarily

This would be very useful for futures — I think it’s pretty much always what they want to do instead of `*waker = cx.waker().clone()`.

Tracking issue: rust-lang#98287

r? rust-lang/libs-api `@rustbot` label +T-libs-api -T-libs
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Nov 15, 2023
Override `Waker::clone_from` to avoid cloning `Waker`s unnecessarily

This would be very useful for futures — I think it’s pretty much always what they want to do instead of `*waker = cx.waker().clone()`.

Tracking issue: rust-lang/rust#98287

r? rust-lang/libs-api `@rustbot` label +T-libs-api -T-libs
@cuviper
Copy link
Member

cuviper commented Dec 5, 2023

I think this is obsolete since #96979 switched to overriding clone_from.

@cuviper cuviper closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Apr 7, 2024
Override `Waker::clone_from` to avoid cloning `Waker`s unnecessarily

This would be very useful for futures — I think it’s pretty much always what they want to do instead of `*waker = cx.waker().clone()`.

Tracking issue: rust-lang/rust#98287

r? rust-lang/libs-api `@rustbot` label +T-libs-api -T-libs
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
Override `Waker::clone_from` to avoid cloning `Waker`s unnecessarily

This would be very useful for futures — I think it’s pretty much always what they want to do instead of `*waker = cx.waker().clone()`.

Tracking issue: rust-lang/rust#98287

r? rust-lang/libs-api `@rustbot` label +T-libs-api -T-libs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants