J
JS
I am monitoring/controlling some realtime activities in a manufacturing
process.
When a part comes into my station, I have a bunch of processing to do.
There are 30-40 data acquisition and data processing steps that need to
be performed. Many of the steps rely on the results of other steps for
their processing.
I have each step coded as a separate instance. The way I'd like to
execute all the steps is to spawn a thread for each of the steps. Each
step's thread would:
1. Wait for all dependent steps to complete (WaitHandle.WaitAll).
2. Perform the desired action
3. Set a ManualResetEvent to signify that this step is done.
Now my problem is that a) I have some serious realtime issues to
contend with; b) I'd like to use a ThreadPool but I think I can only
have 20 or so threads running in the .Net ThreadPool.
Should I write my own thread pool for this, or is a thread pool the
wrong way to go? By the way, I expect to have 5-8 threads running at
any given time with another 30-40 threads waiting for an event.
process.
When a part comes into my station, I have a bunch of processing to do.
There are 30-40 data acquisition and data processing steps that need to
be performed. Many of the steps rely on the results of other steps for
their processing.
I have each step coded as a separate instance. The way I'd like to
execute all the steps is to spawn a thread for each of the steps. Each
step's thread would:
1. Wait for all dependent steps to complete (WaitHandle.WaitAll).
2. Perform the desired action
3. Set a ManualResetEvent to signify that this step is done.
Now my problem is that a) I have some serious realtime issues to
contend with; b) I'd like to use a ThreadPool but I think I can only
have 20 or so threads running in the .Net ThreadPool.
Should I write my own thread pool for this, or is a thread pool the
wrong way to go? By the way, I expect to have 5-8 threads running at
any given time with another 30-40 threads waiting for an event.