Here’s what I know (feel free to correct me):
- Browsers (or browser tabs, as in chrome) are single threaded.
- The event loop is where all events are placed and processed by the single thread.
Here’s what I would like to know:
- How are events created in the browser? Is there a separate thread seeking/creating events?
References on the event model and further readings on the above matter would be greatly appreciated as well.
Javascript has an “event queue”. It picks and handles events from it one by one (the Event Loop).
Under the hood there may be one (or several) threads that populate this queue (ajax call results are ready, etc.)
More reading you can find here.