Repository navigation
Add LocalWaker and ContextBuilder types to core, and LocalWake trait to alloc. - #118960
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This CI failure is strange:
It seems the error message is correct about the fact that we shouldn't be linking to #87021 and we should link instead to #96992. But it makes me question why does it only fail on my branch, I didn't change this issue number after all. |
|
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
|
Just for the record, it might be wise to check if EDIT: This implementation was later removed |
left a comment
There was a problem hiding this comment.
Do we have signoff from T-libs-api on the new unstable surface area? The ACP issue seems to have had a good bit of discussion but I didn't see that signoff made explicit. If you can drive that towards a comment here or there and/or link something, that would be good.
I'm particularly concerned about the surface area confusing newer users -- especially given the frequent concerns over async complexity -- I wonder if we should add a sentence/paragraph to the top-level docs in https://doc.rust-lang.org/nightly/std/task/index.html to clarify the current state (i.e., stable surface area should be sufficient for most uses or so).
commented
Jan 13, 2024
I think it may be better to put it on the docs for |
left a comment
There was a problem hiding this comment.
I like to see a LocalWaker type, but this not the way to do it in my opinion. That's coming from someone who has written a lot of Futures, async function and a runtime specialised in thread-locality (i.e. I very much like to see this change).
I don't think making the Waker optional in Context is wise considering all existing Future related code depends on the Waker type always being part of the Context, it was never not there, a promise we're walking back with this pr.
commented
Jan 13, 2024
|
I made the waker type mandatory on the last commit. Several people have expressed their concern with this aspect of the API. And while I do think that it is better for them to be optional than not, that is not something I consider terribly important. |
commented
Jan 20, 2024
|
☔ The latest upstream changes (presumably #120136) made this pull request unmergeable. Please resolve the merge conflicts. |
…w the extention of contexts by futures
…y removing a #[cfg(target_has_atomic = ptr)]
This also removes * impl From<&Context> for ContextBuilder * Context::try_waker() The from implementation is removed because now that wakers are always supported, there are less incentives to override the current context. Before, the incentive was to add Waker support to a reactor that didn't have any.
commented
Jan 28, 2024
|
@Mark-Simulacrum Do we really need an explicit signoff here? Both teams have discussed it and approved nightly experimentation (libs-team, wg-async). I feel that with no significant changes on the proposal, it is going to be hard to get the teams to meet to discuss the same topic again. |
commented
Jan 28, 2024
|
Those comments seem sufficient to me (I hadn't seen them in my quick skim) for nightly experimentation. @rustbot ready |
commented
Feb 4, 2024
|
@bors r+ |
Implementation for #118959.