Added a concurrent queue to handle input events in the rendering thread.