On Saturday, 18 May 2013 10:58:13 UTC+2, 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!!!

Thanks to all for the discussion/comments on threading, although I have not 
been commenting I have been following.  I have learnt a lot and I am still 
reading up on everything mentioned. Thanks again
Will see how I am going to solve my senario. 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to