Please refer to previous two posts on the same problem - Implementing Thread Pools and Tasks. Here is the link for your convenience.
Yesterday, i added a requirement that i want to have a priority for tasks (a problem on data structures and algorithms). Today, i thought about another feature that gives a lot of flexibility (real OO design). In the above examples, we didn't talk much about the threads in thread pools. Can we try to make threads in thread pool dynamic entity - based on the need, the number of threads in thread pool should grow or shrink. Here are my next set of questions.- What are the design decisions that i should take so as to make thread pool dynamic.
- How can i make threads, tasks, thread pool at the topmost level of abstraction and yet get many different concrete implementations.
- How can i ensure that the code I am going to develop after two years (due to new requirements) doesn't affect my code now (seal the code from modification for new requirements)
- How can i bring in hierarchy, levels of abstraction and modularity for better design?
- Do i have any design patterns?
No comments:
Post a Comment