I have a class A with a LinkedBlockingQueue as property. In one method of A, I call the LinkedBlockingQueue.put() method since I want to insert an item in the queue. But, if the queue is full, my thread will wait until space is available or until my thread is interrupted.
The problem is that even if my thread is interrupted, I want the item to be in the queue.
Is there a way to be sure that my item has been inserted in the queue?
Thanks
The only way I see is to call queue.put() in a loop. This way maybe