You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@BatmanAoD The fact that await!() internally uses yield is an implementation detail which shouldn't be exposed to end users. Eventually we'd like to be able to use async generators (where both yield and await are valid and mean very different things) in order to write Streams.
Activity
BatmanAoD commentedon Jul 10, 2018
Is there an explanation somewhere of why this is necessarily bad?
cramertj commentedon Jul 11, 2018
@BatmanAoD The fact that
await!()internally usesyieldis an implementation detail which shouldn't be exposed to end users. Eventually we'd like to be able to useasyncgenerators (where bothyieldandawaitare valid and mean very different things) in order to writeStreams.BatmanAoD commentedon Jul 11, 2018
Ah, okay.
Is there any compelling reason to permit
await!inside a closure at all, with any semantics?cramertj commentedon Jul 11, 2018
@BatmanAoD Non-
asyncclosures? No.awaitshouldn't be allowed outside ofasyncclosures, blocks, and functions.BatmanAoD commentedon Jul 11, 2018
Oh, I didn't notic that the
async/awaitRFC permitted specifying that a closure could beasync. Yes, I meant non-asyncclosures.Inside of
asyncclosures, permittingawait!as-is shouldn't really be a problem, right?tmandry commentedon Mar 13, 2019
Should this be tagged as AsyncAwait-Blocker?
cramertj commentedon Mar 13, 2019
Yup!
cramertj commentedon Mar 13, 2019
(but it's also in the group of issues that would be obviously fixed by native syntax)
Auto merge of #60586 - cramertj:await, r=oli-obk