Hello,
I build a console application which will run few actions in parallel. I
wanted to know what is the best way to implement it : by regular
threads,some thread interfaces or background workers? And where can I
find good example for that?
Thank you!
Jon Skeet [C# MVP] - 12 Mar 2008 10:55 GMT
> I build a console application which will run few actions in parallel. I
> wanted to know what is the best way to implement it : by regular
> threads,some thread interfaces or background workers? And where can I
> find good example for that?
Well, how much do you already know about threading? I've got a tutorial
of sorts at
http://pobox.com/~skeet/csharp/threads

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Ignacio Machin ( .NET/ C# MVP ) - 12 Mar 2008 12:45 GMT
Hi,
> Hello,
> I build a console application which will run few actions in parallel.
This is the part I do not nderstand, are those external apps? if so all you
have to do is start them.
csharpula csharp - 12 Mar 2008 12:55 GMT
I will work with external applications running via web service but I
need to manage their running by getting the result status and start
them.So what is the best way? SHould I use background worker from main
thread or some other way?
Thanks!
Peter Duniho - 12 Mar 2008 19:21 GMT
> I will work with external applications running via web service but I
> need to manage their running by getting the result status and start
> them.So what is the best way? SHould I use background worker from main
> thread or some other way?
If your own code isn't going to do any of the actual work, you will
probably be best off just starting the processes normally in a single
thread and handling the Process.Exited event to deal with processing any
results.
Pete
csharpula csharp - 13 Mar 2008 09:02 GMT
But I want them to run in parallel so how can I do that?
Thank u!
Jon Skeet [C# MVP] - 13 Mar 2008 09:23 GMT
> But I want them to run in parallel so how can I do that?
When you call Process.Start, that starts a whole extra *process* - so
if you start multiple processes, they'll naturally run in parallel.
Jon