News for hackers. Stuff that matters.
Re:Async and Await in Rust: a full proposal by gpderetta on Sunday July 15, 2018 @04:33PM (#17536924)
Generators, a-la python for example, are completely equivalent to async functions and have nothing to do with IO.
Re:Async and Await in Rust: a full proposal by drb91 on Sunday July 15, 2018 @05:14PM (#17537119)
True! However, I believe rust has a separate, distinct yield/generator functionality coming that should address those needs separately. I think off-hand it’d be pretty easy to wrap them in a stream, or to join a stream into a generator, if you did want to compose them.
Re:Async and Await in Rust: a full proposal by steveklabnik on Sunday July 15, 2018 @05:16PM (#17537125)
That’s correct; async/await uses Generators under the hood, but we haven’t stabilized them yet. It’s the plan to though!