This project is read-only.


Oct 1, 2009 at 2:52 PM

I have an application that will be submitting multiple threads and I'm thinking STP will be what I use but I'm not sure the best way to handle.

Here is what I need to do...

The user will supply a starting point for the run and depending on that starting point I could have as little as 5 worker threads but as many 1500+ threads (I know a little crazy). (Here is where things get a little messy.) For each of those worker threads, once it completes I need to check if it completed as expected or some type of exception. If an exception (most likely a network related issue) I need to submit it to the queue again. This re-run if unsuccessful process needs to happen up to 5 times per worker thread before the user considers it to be a total failure. The order of the running and re-running of the threads doesn't matter.

I was thinking I should use the WaitAny and WorkItemGroup but I'm not sure of the best way to set up resubmitting an item to the queue to run again. Any suggestions?

Thanks, Butch