4 ms·
in javascript's programming model, literally everything that's running in response to user action (clicks, etc.) absolutely has to complete immediately (from th
by kubb 5y ago
in javascript's programming model, literally everything that's running in response to user action (clicks, etc.) absolutely has to complete immediately (from the browser user's point of view), or it will hang the UI. async event handlers really help with that. a non-async handler blocking until a long standing operation is complete (i.e awaiting an async function) is unacceptable
the async/non async functions in javascript are good and well designed. the whole colored functions thing is nonsense and it's weird that it gained so much traction on here
- kaba0 5y agoStarting up a new virtual thread and writing “blocking” code in it, while the VM schedules it on top of a single thread is entirely possible and will make everything happen quasi-instantly, the same way as async is.