Optimization means that if you have several threads producing and consuming, there are optimizations such that they are faster if they can return an item placed in the bag by the same thread.
If this optimization is not applied, this is if the thread requests a bag for the item and there are more items left in the bag that were placed there by this thread. In this case, he can still remove the item from the bag (put there with another thread), but it is less optimal.
Or, to put it another way: This is in parallel, because several flows and consuming it simultaneously, without external blocking, can enter it. The specified optimization does not make this incorrect.
source share