2 ms·
If you have one thread, and it's just in a loop checking and rechecking on a promise to resolve, you will deadlock, because nothing is actually running the asyn
by roywiggins 5y ago
If you have one thread, and it's just in a loop checking and rechecking on a promise to resolve, you will deadlock, because nothing is actually running the async function.
Await actually pauses your function and allows the async runtime to work on other stuff, such as completing the function you just awaited on.