B
bean330
Hey, I'm somewhat new to C# and I need a little help, please!
I'm selecting a bunch of records, setting properties on a COM
executable and then calling a method on that executable to run. I
want to run the executable in separate threads because they can be
long-running and it would be optimal for us to run a bunch
simultaneously.
I've got that part working - it's pretty easy in C#. What I'm having
a hard time with is managing the threads. That is, I am using a
dynamic number of threads and I'm unclear on how to set off these
executables in x number of threads, and then wait for one of those
threads to free up before attempting to send off another. I've looked
a little at the ThreadPool, but I'm unclear if this is how I should be
proceeding.
Any advice would be greatly appreciated. Thanks!
I'm selecting a bunch of records, setting properties on a COM
executable and then calling a method on that executable to run. I
want to run the executable in separate threads because they can be
long-running and it would be optimal for us to run a bunch
simultaneously.
I've got that part working - it's pretty easy in C#. What I'm having
a hard time with is managing the threads. That is, I am using a
dynamic number of threads and I'm unclear on how to set off these
executables in x number of threads, and then wait for one of those
threads to free up before attempting to send off another. I've looked
a little at the ThreadPool, but I'm unclear if this is how I should be
proceeding.
Any advice would be greatly appreciated. Thanks!