خرید بک لینک

Vote count: 0

Let's say two threads are simultaneously trying to enqueue N tensors each, into an instance of a FIFOQueue. I.e., they're calling

queue_instance.enqueue_many(T) where T is a list of tensors of length N.

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

asked 57 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 12 فروردين 1395 ساعت: 4:31

صفحه بندی