4 ms·
Please correct me if I'm wrong, but I think with generators, the caller has to keep calling next on it, which you don't have to with C# style async-await.
by findjashua 12y ago
Please correct me if I'm wrong, but I think with generators, the caller has to keep calling next on it, which you don't have to with C# style async-await.
- TazeTSchnitzel 12y agoIn the C# style, someone is still calling next on it somewhere.
- findjashua 12y agoSo 'async' functions return a generator? If a library uses async-await, the library users have to call next on the generator? I assumed the language handled resuming the generator, so the users didn't have to.