Why queue.empty() returns False even after put() is called?

2012-11-23 Thread Peng Yu
Hi, The empty() returns True even after put() has been called. Why it is empty when there some items in it? Could anybody help me understand it? Thanks! ~/linux/test/python/man/library/multiprocessing/Queue/empty$ cat main.py #!/usr/bin/env python import multiprocessing queue =

Re: Why queue.empty() returns False even after put() is called?

2012-11-23 Thread MRAB
On 2012-11-23 16:57, Peng Yu wrote: Hi, The empty() returns True even after put() has been called. Why it is empty when there some items in it? Could anybody help me understand it? Thanks! ~/linux/test/python/man/library/multiprocessing/Queue/empty$ cat main.py #!/usr/bin/env python import

Re: Why queue.empty() returns False even after put() is called?

2012-11-23 Thread Ian Kelly
On Fri, Nov 23, 2012 at 9:57 AM, Peng Yu pengyu...@gmail.com wrote: Hi, The empty() returns True even after put() has been called. Why it is empty when there some items in it? Could anybody help me understand it? Thanks! ~/linux/test/python/man/library/multiprocessing/Queue/empty$ cat

Re: Why queue.empty() returns False even after put() is called?

2012-11-23 Thread Cameron Simpson
On 23Nov2012 11:53, Ian Kelly ian.g.ke...@gmail.com wrote: | On Fri, Nov 23, 2012 at 9:57 AM, Peng Yu pengyu...@gmail.com wrote: | The empty() returns True even after put() has been called. Why it is | empty when there some items in it? Could anybody help me understand | it? Thanks! | |