Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7987
| Date | 2011-06-20 03:04 +1000 |
|---|---|
| From | Lie Ryan <lie.1296@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: threading : make stop the caller |
| References | <itl1sc$ap0$1@news.univ-fcomte.fr> <mailman.155.1308496777.1164.python-list@python.org> <itl56g$aut$1@news.univ-fcomte.fr> <mailman.160.1308501519.1164.python-list@python.org> <itl9h0$b5t$1@news.univ-fcomte.fr> |
| Message-ID | <4dfe2c71$1@dnews.tpgi.com.au> (permalink) |
On 06/20/11 02:52, Laurent Claessens wrote: > >> Popping task off the end of the list is more efficient: > >> while task_list: >> task_list.pop().start() > > That's cool. In my case it's better to do > task_list.pop(0).start > > in order to pop the first element. then you really wanted a queue instead of a list. There is a thread-safe `queue` module in the standard library.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
threading : make stop the caller Laurent Claessens <moky.math@gmail.com> - 2011-06-19 16:42 +0200
Re: threading : make stop the caller Chris Angelico <rosuav@gmail.com> - 2011-06-20 01:19 +1000
Re: threading : make stop the caller Laurent Claessens <moky.math@gmail.com> - 2011-06-19 17:39 +0200
Re: threading : make stop the caller Laurent Claessens <moky.math@gmail.com> - 2011-06-19 17:54 +0200
Re: threading : make stop the caller Chris Angelico <rosuav@gmail.com> - 2011-06-20 02:03 +1000
Re: threading : make stop the caller Laurent Claessens <moky.math@gmail.com> - 2011-06-19 18:08 +0200
Re: threading : make stop the caller Terry Reedy <tjreedy@udel.edu> - 2011-06-19 12:38 -0400
Re: threading : make stop the caller Laurent Claessens <moky.math@gmail.com> - 2011-06-19 18:52 +0200
Re: threading : make stop the caller Lie Ryan <lie.1296@gmail.com> - 2011-06-20 03:04 +1000
Re: threading : make stop the caller Terry Reedy <tjreedy@udel.edu> - 2011-06-19 12:58 -0400
csiph-web