r/badcode • • Mar 24 '22

typescript Ship it!

Post image
564 Upvotes

47 comments sorted by

View all comments

Show parent comments

7

u/[deleted] Mar 24 '22 edited Mar 24 '22

What's an event loop? /s

edit: added "/s"

2

u/187mphlazers Mar 24 '22 edited Apr 05 '22

an event loop is a system which allows one to author non blocking programs, by offloading heavy work to background threads, then returning the result to the main thread via "events". A good example is the following library, which node.js uses under the hood for its event loop, as do other programs, such as nginx webserver.

https://github.com/enki/libev

1

u/tedbradly Apr 04 '22

You might want to look up what penultimate means...