C#: Farm out jobs to worker processes on a multi-processor machine

Posted by Andrew White on Stack Overflow See other posts from Stack Overflow or by Andrew White
Published on 2010-06-15T10:07:42Z Indexed on 2010/06/15 10:12 UTC
Read the original article Hit count: 315

Filed under:
|
|
|

Hi there,

I have a generic check that needs to be run on ca. 1000 objects. The check takes about 3 seconds. We have a server with 4 processors (and we also have other multi-processor servers in our network) so we would like to create an exe / dll to do the checking and return the results to the "master".

Does anyone know of a framework for this, or how would one go about it in C#?
Specifically:
* What's the best way to transfer data between the master and the worker process?
* How would the master ensure that always 4 processes are running at any one time and as soon as a worker process is finished start a new one.
* How to register that the worker is finished and append it's results to a list?

Hope it's clear enough but happy to clarify. A.

© Stack Overflow or respective owner

Related posts about c#

Related posts about process