This is my first dev blogpost and doesn't matter if it is just couple of sentences. Couple of sentences are still better than not writing at all. This week I'm writing brief about Event Loop
Event Loop as the name says it is loop which iterates over the events. Each iteration of the loop is called as Tick in which it tries to execute the events scheduled in the callback queue. These events are nothing but the callbacks functions. Imagine you are fetching a resource over REST API and it is an asynchronous event and when it is complete in due time you would like your function invoked with response of API. This function is nothing but the Callback which gets executed by the event loop when the API is successful.
There are other different queues other than callback queues in the Event loop like Job Queues and there is special way timers(setTimeout) are handled in Event loop.
Top comments (0)