Im just starting out writing and using the TPL in .NET 4.5 and was wondering if you could help me.
Basically, my WPF program performs heavy duty work over a set of database records which could be in the range of 5 to 10 million. I want to make use of the TPL library to efficiently manage this work while keeping the UI responsive.
My scenario is as follows, I was planning on using 3 separate tasks to retrieve data of say 3 million each, and feed them to my "worker".
And I want a separate task that takes each item from ALL the items from the above tasks and does some work with it.
So i want a global List of items that all 3 tasks can put items in, my fourth task, should then pick items from this master list one at a time and do some work with it, it should wait if the list is empty for it to be filled up again etc.
Could you please provide some guidance on how to do this with TPL? I am a newbie with the TPL. Some sample code would be good.