I am interested to get some ideas from you about what would be a good/better threading architecture that respects the rules described below:
-
A thread must be running for the life of the application, in the sleep/wait mode if there is no work in the queue to be performed.
-
A thread must be of a BelowNormal priority (this eliminates possibility of using ThreadPool).
-
The thread must give its feedback to the main thread upon completion of task.
-
Thread will monitor a Queue<T> to get more jobs to be performed.
I am using .Net Framework 4.0
Let me know what you think 🙂
When I need to implement my own multi-threaded processing, I usually use something like this: