12-07-2012 05:52 AM
hello and good day ,
Please what is the most efficient way to manage http connections in a case where for example i need to load people data and display like this :
picture name
-------------- --------------------------
picture name
--------------- ----------------------------
now i will need to display @ least 200 + of this , so i first of all downloaded all the names , and then created a threadpool to manage the download of images , i have an exception when downloading more than 20 images when making a httpconnection is there a way to pool the httpconnection knowing that the url of the image is different for each row , i really need to know , thanks .
Solved! Go to Solution.
12-07-2012 06:00 AM
12-07-2012 06:26 AM
12-07-2012 08:38 AM
There are a number of Threads on the forum that discuss this. This is not too bad:
but I think there are a number of others. Have a search round.
A single queue and a single Thread downloading is a simple solution to implement usually. but Mutliple Threads will probably see better performance, the debate is how many, and I think that depends on the OS and the connection method.
12-07-2012 08:47 AM
12-07-2012 12:14 PM
Thanks everyone , Please can anyone lead me to a proper sample thread pool implementation for blackberry , thanks.
12-10-2012 02:50 AM
12-10-2012 09:43 AM
Thanks simon please can i see your sample code so i can understand how to implement mine i am talking of a system wide threadpool impementation that will enable tasks to be accomplished in a queue if there are no tasks they all sleep.