I'm new to multithreading and I'm working on parallelizing an area in my application. I've read a number of posts on this site but I'm still confused as to the best way to approach my problem:
[1] In .NET 3.5, is ThreadPool the only way for a program to exploit the multi-cores in the machine ? i.e. Is it possible to spawn threads on different cores using new Thread() ?
[2] My case: I have List<Calculation>that contains around 80 items, currently processed sequentially. So given that I'm using .NET 3.5 and based on what I've read, ThreadPool is probably my best bet for multithreading due to the high number of threads, however:
This is how the dependency of the work items looks like (details not important, just wanted to make a point on the complexity of the dependencies):

How do I prioritize the main Calculations that have something like 10+ other work items depending on it ? What is the most efficient way of signaling to use ?
Thank you.
Edit: I should mention that List<Calculation> remains fixed. However, computing the 80+ calculations is called x million times. Every time an iterator is updated, Calculate() is invoked on every Calculation in the list.
[1]: Yes, it is possible to spawn threads on different cores using new Thread(), although you might be better served using the threadpool. The differences are discussed here:
Thread vs ThreadPool
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With