I\'m looking for a way to block until a BlockingQueue is empty.
BlockingQueue
I know that, in a multithreaded environment, as long as there are producers putting items in
According to the documentation, BlockingQueue can be blocked on "Remove" by methods: take() or poll(time, unit) instead of poll()
take()
poll(time, unit)
poll()