I have something like this in my code:
worker.setObject(queue.poll());
I want a queue that when the poll method (or another one) is called, if the queue is empty, it wait until there is an object to return (not return null). There is some queue or method that does this.
Yes, this one, for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With