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

await macro is not in libcore. #56767

Closed
WildCryptoFox opened this issue Dec 13, 2018 · 6 comments
Closed

await macro is not in libcore. #56767

WildCryptoFox opened this issue Dec 13, 2018 · 6 comments
Labels
A-async-await Area: Async & Await AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@WildCryptoFox
Copy link
Contributor

The await!() macro is defined in std but not in core, is there any reason for this?

@bjorn3
Copy link
Member

bjorn3 commented Dec 13, 2018

It uses thread local storage, which isnt available outside libstd.

@WildCryptoFox
Copy link
Contributor Author

@bjorn3 Hm. So it does. Looks like @Nemo157 's embrio fills the spot.

https://github.com/Nemo157/embrio-rs/blob/master/embrio-async/dehygiene/src/lib.rs

@Nemo157
Copy link
Member

Nemo157 commented Dec 13, 2018

It's intended to be moved to core at some point (there's a few ways to reimplement it, embrio-async's implementation is one but has some relatively spread out safety guarantees, adding the ability for generators to take resume arguments is another that I think would avoid needing any unsafe code at all).

I thought this was already noted on the tracking issue (#50547), but looking at it again it doesn't appear so, adding this issue to the unresolved questions would probably be useful.

@WildCryptoFox
Copy link
Contributor Author

Thanks @Nemo157

@jonas-schievink jonas-schievink added the A-async-await Area: Async & Await label Jan 26, 2019
@nikomatsakis nikomatsakis added AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 5, 2019
@nikomatsakis
Copy link
Contributor

Marking as not blocking for stabilization. Obviously we want things to work from core eventually, but it's ok if that doesn't work to start. Moreover, the major blocker here is resolving how generator arguments should work -- once that works, it seems clear that we'll be able to solve this.

@cramertj
Copy link
Member

cramertj commented Sep 4, 2019

Closing this in favor of #56974

@cramertj cramertj closed this as completed Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants