Replaced glfwWaitEvents by glfwPollEvents
Added threaded sample