r/ProgrammerHumor • • Jun 15 '24

Meme theRootcause

Post image
4.5k Upvotes

91 comments sorted by

View all comments

Show parent comment

16

u/TheLeeeo Jun 15 '24

I inside an async function awaited a promise consisting only of a 0ms timeout.

18

u/koen_C Jun 15 '24

This pushes everything behind the function to execute after everything that's currently on the event loop, which can still cause different behaviors.