Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

parallel (threads)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
csharpula csharp - 12 Mar 2008 10:44 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.