Using a threadsafe queue is a fantastic concurrency pattern, but this particular bit will spin the CPU to 100% while the queue is empty, will tend to starve the thread that does feed it
I'm not sure to understand your point here, if the queue is empty, the poll method returns null so the loop exits directly ... why would it spin the CPU to 100% ?
A Blocking queue is exactly what I don't want, the processMessages() is supposed to be called in the game loop ... so using a BlockingQueue will block the main game loop. I want the processMessage() method to exit immediately if the queue is empty.