lewissbaker / cppcoro

A library of C++ coroutine abstractions for the coroutines TS
MIT License
3.43k stars 472 forks source link

when_all_ready() example2 #130

Open IgorStauder opened 5 years ago

IgorStauder commented 5 years ago

bug in README.md when_all_ready() example:

task<> example2() { ... // Unpack and handle each result individually once they're all complete. for (int i = 0; i < 1000; ++i) { try { >>> std::string& record = tasks[i].result(); should be std::string& record = resultTasks[i].result(); ... }