2 Replies Latest reply: Nov 22, 2011 6:42 PM by 796440 RSS

    out of order when put /take packages in/from a blocking queue

      Hello all:

      I put multiple packages in a blocking queue in one thread, and take them out from another thread. The in sequence is 1-2-3, the out sequence becomes 3-2-1. This is NOT a FILO pattern, there is no pattern: it could be 3-1-2, etc.

      The question is: can out-of-order issue even take place when put()/take() operations impose on a blocking queue? If it's not possible, which I believe, I'll look elsewhere for the cause. Otherwise, why and how to fix it.