Re:Show HN: Coros – A Modern C++ Library for Task Parallelism
by viralsink on Wednesday September 25, 2024 @12:38PM
(#41649222)
Is there a way to prevent callback hell in C++ when doing asynchronous communication with C++ before 20? Coroutines seem to be the only clean solution. Promises can work, but they tend to be difficult to reason about if branching is involved.
[ Parent
| on HN ]
Re:Show HN: Coros – A Modern C++ Library for Task Parallelism
by darknavi on Wednesday September 25, 2024 @01:05PM
(#41649503)
Traditionally the way to prevent "callback hell" is to use something like async/await syntax. Without that there aren't a ton of good options. Like you mentioned, you could switch to promises with polling.