Im implimenting a java game with multiplayer and i have a sender thread to send a messages from a Queue to another player. I have read here: https://developer.android.com/reference/java/util/concurrent/BlockingQueue.html "A Queue that additionally supports operations that wait for the queue to become non-empty"
which operetions and how to use them , and i know that an infinte loop that always checks if something Queue is what i want to avoid.