3 ms·
Well, there's nothing you couldn't write yourself, sure... but async/await does generate unsafe code in some cases, so it is at least somewhat magical that you
by Jweb_Guru 7y ago
Well, there's nothing you couldn't write yourself, sure... but async/await does generate unsafe code in some cases, so it is at least somewhat magical that you can do it in safe code. Since async/await has unsafe code that is really fiddly to get right otherwise (c.f. the rules for `Pin`), I think this is a pretty good tradeoff and a great use of magic.