So I am trying to get an idea of how browsers are internally implemented. The browser must poll the event queue for events, but I am wondering how frequently this is done or If there is some sort of pattern/known solution to go about this?
You clearly can't do
while(1) {
//check the event queue for events
}
B/c that would lock up the entire thread and the browser uses a single-threaded execution model in which it checks the event queue for any events, if there is an event in the event queue - then it executes it. (At least that's how I understand it)