// 2) First, checks if the thread that is running the loop for
// the polling has ended - if so it breaks out
// 3) Next, it checks if there was an error getting this event from
// 2) First, checks if the thread that is running the loop for
// the polling has ended - if so it breaks out
// 3) Next, it checks if there was an error getting this event from