I want to perform several tasks (Disk IO on Remote Shares) at the same time. I do not want to block the UI. I think I need to create a custom class that does the following...
- Accepts and queues a request (using a Stack)
- Checks the thread pool and if a thread is available starts it with the requested info
- As each thread completes check the stack for pending requests...
Is there a better way to do this?
Is there a class already available for this?
Should I use a pool of the BackgroundWorker class or something else?
Will I have to implement the BackgroundWorker class in a custom class so that I can create multiple threads?
I want to create up to 8 threads for deleting files and folders. I need to query the number of items on the stack for updating the UI.
I currently have the code working with a single BackgroundWorker thread to delete the files and folders (which keeps the UI from locking, but it takes so long I tend to run several of the utilities at the same time).
Thanks, Lee