[docs] [issue14206] multiprocessing.Queue documentation is lacking important details

sbt report at bugs.python.org
Tue Mar 6 13:28:37 CET 2012

sbt <shibturn at gmail.com> added the comment:

What you were told on IRC was wrong.  By default the queue *does* have infinite size.

When a process puts an item on the queue for the first time, a background thread is started which is responsible for writing items to the underlying pipe.  This does mean that, on exit, the process should wait for the background thread to flush all the data to the pipe.  This happens automatically unless you specifically prevent it by calling cancel_join_thread() method.

If you stick to those methods supported by standard queue objects, then things should work correctly.  

(Maybe cancel_join_thread() would be better named allow_exit_without_flush().)

nosy: +sbt

Python tracker <report at bugs.python.org>

More information about the docs mailing list