DEV Community

Discussion on: Async + Await refactor, which do you like best?

Collapse
 
qm3ster profile image
Mihail Malo

I think the async/await is a clear winner here, since these were 4 sequential operations, 2 of which just needed to yield yet still block the progress of this function, and cancel the function if they throw.
It's the textbook happy case for async/await.

I do agree with @avalander 's refactor though, which gets you closer to this without the async syntax.