by mschuetz · 3y ago · 0 comments
Sure, there are other ways to handle these things like polling state, but async makes it trivial and readable.
But this mostly applies to JS which has a kickass implementation of async/await. Whatever C++ tried to do, it's an awful mess so there I still use threads with busy loops, polling, etc., whatever makes sense for the task at hand.
The fact that JS simply has no other options for doing anything concurrently, might have something to do with that.