File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -515,6 +515,23 @@ Note that one can also create a shared queue by using a manager object -- see
515515 the :mod: `multiprocessing ` namespace so you need to import them from
516516 :mod: `queue `.
517517
518+ .. note ::
519+
520+ When an object is put on a queue, the object is pickled and a
521+ background thread later flushes the pickled data to an underlying
522+ pipe. This has some consequences which are a little surprising,
523+ but should not cause any pratical difficulties -- you can always
524+ use a managed queue if they really bother you.
525+
526+ (1) After putting an object on an empty queue there may be an
527+ infinitessimal delay before the queue's :meth: `~Queue.empty `
528+ method returns :const: `False ` and :meth: `~Queue.get_nowait ` can
529+ return without raising :exc: `Queue.Empty `.
530+
531+ (2) If multiple processes are enqueuing objects, it is possible for
532+ the objects to be received at the other end out-of-order.
533+ However, objects enqueued by the same process will always be in
534+ the expected order with respect to each other.
518535
519536.. warning ::
520537
You can’t perform that action at this time.
0 commit comments