Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45499
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'scripts': 0.03; 'nested': 0.07; 'subject:help': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'works.': 0.09; 'runs': 0.10; 'python': 0.11; 'thread': 0.14; 'code?': 0.16; 'dict': 0.16; 'dictionaries': 0.16; 'iterating': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'threads.': 0.16; 'elements': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'starts': 0.20; 'seems': 0.21; 'creating': 0.23; 'header:User-Agent:1': 0.23; 'script': 0.25; 'header:X-Complaints-To:1': 0.27; 'thus': 0.29; 'long.': 0.31; 'lists': 0.32; 'this.': 0.32; 'up.': 0.33; 'url:python': 0.33; 'mac': 0.33; 'subject:with': 0.35; 'created': 0.35; 'module.': 0.36; 'list': 0.37; 'list.': 0.37; 'to:addr :python-list': 0.38; 'resource': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'first': 0.61; 'show': 0.63; 'url:htm': 0.73; 'goal': 0.75; '80%': 0.84; 'drops': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Peter Otten <__peter__@web.de> |
| Subject | Re: Please help with Threading |
| Date | Sat, 18 May 2013 11:09:03 +0200 |
| Organization | None |
| References | <7baacf5a-0c50-4935-ad5b-148c208d759b@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| X-Gmane-NNTP-Posting-Host | p5084af2e.dip0.t-ipconnect.de |
| User-Agent | KNode/4.7.3 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1796.1368868155.3114.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1368868155 news.xs4all.nl 15940 [2001:888:2000:d::a6]:40090 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:45499 |
Show key headers only | View raw
Jurgens de Bruin wrote:
> This is my first script where I want to use the python threading module. I
> have a large dataset which is a list of dict this can be as much as 200
> dictionaries in the list. The final goal is a histogram for each dict 16
> histograms on a page ( 4x4 ) - this already works.
> What I currently do is a create a nested list [ [ {} ], [ {} ] ] each
> inner list contains 16 dictionaries, thus each inner list is a single page
> of 16 histograms. Iterating over the outer-list and creating the graphs
> takes to long. So I would like multiple inner-list to be processes
> simultaneously and creating the graphs in "parallel".
> I am trying to use the python threading for this. I create 4 threads loop
> over the outer-list and send a inner-list to the thread. This seems to
> work if my nested lists only contains 2 elements - thus less elements than
> threads. Currently the scripts runs and then seems to get hung up. I
> monitor the resource on my mac and python starts off good using 80% and
> when the 4-thread is created the CPU usages drops to 0%.
>
> My thread creating is based on the following :
> http://www.tutorialspoint.com/python/python_multithreading.htm
>
> Any help would be create!!!
Can you show us the code?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Please help with Threading Jurgens de Bruin <debruinjj@gmail.com> - 2013-05-18 01:58 -0700
Re: Please help with Threading Peter Otten <__peter__@web.de> - 2013-05-18 11:09 +0200
Re: Please help with Threading Jurgens de Bruin <debruinjj@gmail.com> - 2013-05-18 04:23 -0700
Re: Please help with Threading Peter Otten <__peter__@web.de> - 2013-05-18 14:01 +0200
Re: Please help with Threading Dave Angel <davea@davea.name> - 2013-05-18 09:55 -0400
Re: Please help with Threading Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-18 15:28 -0400
RE: Please help with Threading Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-19 03:02 +0300
Re: Please help with Threading Chris Angelico <rosuav@gmail.com> - 2013-05-19 10:38 +1000
Re: Please help with Threading Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-19 17:46 -0400
Re: Please help with Threading Chris Angelico <rosuav@gmail.com> - 2013-05-20 07:52 +1000
Re: Please help with Threading Dave Angel <davea@davea.name> - 2013-05-19 21:04 -0400
Re: Please help with Threading Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-19 22:58 -0400
Re: Please help with Threading Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-19 23:25 -0400
Re: Please help with Threading Fábio Santos <fabiosantosart@gmail.com> - 2013-05-20 07:25 +0100
Re: Please help with Threading Jurgens de Bruin <debruinjj@gmail.com> - 2013-06-02 18:47 -0700
csiph-web