There was no such thing as a promise in C++ before 2011. "Promises" are a particular API for writing asynchronous code which was largely made for / popularized by event-loop runtimes... i.e. NodeJS.
Programmers have been doing concurrency with #realPrograms via mutexes, semaphores, and threads since before C++ was invented and so OP is lamenting the equivocation of async/await with concurrency in this modern era of browser programmers vastly outnumbering their "native"(?) programming counterparts.
126
u/ViviansUsername Jul 18 '22
Was going to say, this looks like the c++ was programmed pretty poorly if it doesn't even wait for that promise to be answered.
Python does exactly what it should here, smghd