This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hello everyone. I have an information question. In my application the user sets the number of threads that should run a certain type of code( task).
in my source code there are 2 different type of tasks that needs to be run by the ThreadPool. information saved in a database by the first task is needed in the second task. Task are being added(scheduled) to the threadpool by a timer task that runs every 10 seconds.
So... my question is how is better to use:
a) One ThreadPool that runs those 2 different tasks. I already use this option but I have problems in balancing the scheduled number of tasks that will run in some future.
b) two threadpool one for every task -seems an easy option for me, but not such cleaner as the first( in my opinion)
If you think the solution from point a) is much better can you help me with some general information about how to build an balanced scheduled task system so on the threadpool should not run only the first or the second task.