Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7987
| Date | Mon, 20 Jun 2011 03:04:07 +1000 |
|---|---|
| From | Lie Ryan <lie.1296@gmail.com> |
| User-Agent | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110513 Lightning/1.0b3pre Thunderbird/3.1.10 ThunderBrowse/3.3.5 |
| MIME-Version | 1.0 |
| 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> |
| In-Reply-To | <itl9h0$b5t$1@news.univ-fcomte.fr> |
| X-Enigmail-Version | 1.1.2 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| NNTP-Posting-Host | 110.175.240.90 |
| X-Original-NNTP-Posting-Host | 110.175.240.90 |
| Message-ID | <4dfe2c71$1@dnews.tpgi.com.au> (permalink) |
| X-Trace | dnews.tpgi.com.au!tpg.com.au 1308503153 110.175.240.90 (20 Jun 2011 03:05:53 +1000) |
| Lines | 15 |
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!news.snarked.org!newsfeed.news.ucla.edu!usenet.stanford.edu!news.kjsl.com!rahul.net!wasp.rahul.net!rahul.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!nntp3.phx1!dnews.tpgi.com.au!tpg.com.au!not-for-mail |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:7987 |
Show key headers only | View raw
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