I was tasked with working on a boot queue system, but I'm a little confused about where to start.
Essentially, we need to have something like a boot manager (but not so full). We have about 20-100 files to download, we provide the user with a user interface (with a list) that allows them to pause, stop or move the priorities of tasks.
What confuses me is the data structure that needs to be used, the order of priorities is a way out of my research, but I'm confused about how to make it work. Do I have a background thread that looks in the queue and raises the next task and moves it forward? I also need to ensure progress, since the files are downloaded - they are quite large, sometimes 120 MB (but local, so no more than 10 minutes).
Sometimes they have to pause the task and complete the task higher in the queue, since it is considered urgent.
This is not a boot manager, so no problems with throttling, etc. How do people write such things?
I was thinking of having an interface, such as IDownloadTask, which describes the task to be executed, has several properties and an event to expose its Progress (which is connected when tasks are completed).
Then put this IDownloadTask in the priority queue. The background worker picks it (PriorityQUeue priority should be synchronized, I think), and then executes the .Execute () method in the implementation of the interface in a separate thread.
Does that sound reasonable? Are there any specific examples anyone can show me?
EDIT
Thanks for the answer and vote of confidence, I should mention that I am using .NET 2.0 (we cannot move higher due to Windows compatibility requirements for Windows 9x).
Tanya young