What's the best way to implements a thread pool with webrequest?

simpleonline

Active member
Joined
Sep 13, 2011
Messages
33
Programming Experience
Beginner
I have about 1000 webrequest created. Each link will navigate to a website and download a picture to place into a picturebox.
The person will then type in what animal is in the picture into a textbox. Then the user will then hit the submit button to send the name of the animal back to the site.

I am going to implement the use of a thread pool to handle the threading portion of those requests.
My question is this:

What is the best method to get my webrequest into the thread pool (listbox, txt file,etc?) and then how can I setup my button to coordniate with the site that is coming out of the pool to the picture box?
My first thought is to create everything on the fly. The picturebox, the textbox, and the submit button, the webrequest to the site for the picture and back again for the result. Something tells me that I will be taking the long way around to get same result.

My second thought is to have a slew of pictureboxes, textboxes, and buttons already on my screen and then when they come out of the pool and into a thread they would assigned a picturebox, textbox, and button if the others are not busy.
Which of the two would a better route?
Thanks
 
Back
Top