Does Tensorflow's QueueBase.enqueue_many preserve order across threads?
<p>Let's say two threads are simultaneously trying to enqueue N tensors each, into an instance of a FIFOQueue. I.e., they're calling</p>

<p><code>queue_instance.enqueue_many(T)</code> where <code>T</code> is a list of tensors of length <code>N</code>. </p>

<p>Let's label each tensor from the first thread as <code>T1_1</code> to <code>T1_N</code>, and <code>T2_1</code> to <code>T2_N</code> for the second thread. When all is said and done (both calls to <code>enqueue_many</code> have completed), will the order be preserved? I.e., will the queue contain either <code>[T1_1, ..., T1_N, T2_1, ..., T2_N]</code> or <code>[T2_1, ..., T2_N, T1_1, ..., T1_N]</code>? Or could the tensors be enqueued in an interleaved manner, i.e., <code>[T2_1, T2_2, T1_1, T2_3, T1_2, ...]</code>? Or, I suppose, a third option is that there is no rhyme or reason whatsoever: the tensors are enqueued in an arbitrary order.</p>