Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33862
| Date | 2012-11-23 18:53 +0000 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: Why queue.empty() returns False even after put() is called? |
| References | <f5b194cd-cf32-4c3b-a909-8c53a72a4b64@b12g2000vbg.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.239.1353696834.29569.python-list@python.org> (permalink) |
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 multiprocessing > > queue = multiprocessing.Queue() > print queue.empty() > queue.put(['a', 'b']) > queue.put(['c', 'd']) > print queue.empty() > It works correctly for me.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why queue.empty() returns False even after put() is called? Peng Yu <pengyu.ut@gmail.com> - 2012-11-23 08:57 -0800 Re: Why queue.empty() returns False even after put() is called? MRAB <python@mrabarnett.plus.com> - 2012-11-23 18:53 +0000 Re: Why queue.empty() returns False even after put() is called? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-23 11:53 -0700
csiph-web