This may not be suitable here, please feel free to move, shout or abuse if so.
We currently have a console application that get started by another and passed in an ID of the 'job', this job will have multiple records that need to be processed. A simple explanation of the flow would be;
Starts 50 threads
Gets records to be processed.
if records > 0 see what threads are not still busy and send it some information.
if records = 0 update something else and exit.
Get more records.
Loop.
Now, I am looking to convert this into a 'polling' service that is continually running and when new records are available, process them. To take what I have and convert this is fairly simple, but the threads stuff is old and probably outdated.
I was looking to refactor most if not all and use Task.Parallel to process the items. However, I am struggling to get a suitable framework for polling and then processing the items and was looking for suggestions on how to achieve this.
Pretty vague I know, but hopefully enough to give some kind of input.
Many thanks