473,804 Members | 2,184 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

parallel (threads)

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!


*** Sent via Developersdex http://www.developersdex.com ***
Mar 12 '08 #1
5 1681
Hi,

"csharpula csharp" <cs*******@yaho o.comwrote in message
news:uB******** ******@TK2MSFTN GP02.phx.gbl...
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.

Mar 12 '08 #2
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!

*** Sent via Developersdex http://www.developersdex.com ***
Mar 12 '08 #3
On Wed, 12 Mar 2008 04:55:37 -0700, csharpula csharp <cs*******@yaho o.com>
wrote:
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
Mar 12 '08 #4

But I want them to run in parallel so how can I do that?
Thank u!
*** Sent via Developersdex http://www.developersdex.com ***
Mar 13 '08 #5
On Mar 13, 8:02 am, csharpula csharp <csharp...@yaho o.comwrote:
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
Mar 13 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1749
by: Markus Franz | last post by:
Hi. I have a difficult problem: An array contains several different URLs. I want to load these websites in parallel by using a HTTP-Request. How can I do this in PHP? Up to now I did this with an external Python script because Python offers process control functions. But in PHP only exist restricted possibilities for using threads / processes.
5
1762
by: chellappa | last post by:
Hi All, I need information running two function in parallel manner with out using fork .. because i am trying to use fork ..but fork create two process ..i will done through any other methods,one of my friend told using thread.please help how to use thread run two program in parallel manner advance thanks by chellappa
5
1679
by: MIchael Ullrich | last post by:
Hi, actually I have a childform, which runs a self-written script interpreter (runs aprox. 1 min). I want to create more child-forms and I want to have the interpreters run parallel. Right now only the interpreter of the last created form is running until it is finished and then the other ones are continuing. How can I make parallel working child-forms
126
4381
by: ramyach | last post by:
Hi friends, I need to write a parallel code in 'C' on the server that is running SGI Irix 6.5. This server supports MIPS Pro C compiler. I don't have any idea of parallel C languages. I looked into few posts in this group. I could make out that there are several languages for parallel programming and parallel C is one of them. I need to know if this is supported by MIPS Pro C Compiler. Or are there any other parallel C languages that have...
14
7899
by: Dave Booker | last post by:
I'm doing some analysis that is readily broken up into many independent pieces, on a multicore machine. I thought it would be best to just queue like 1000 of these pieces in the ThreadPool, and let that object take care of running them in the background on the machine's free cycles. But I need the program to wait for all the queued pieces to finish before it continues. I tried giving each work item a ManualResetEvent and using...
10
2485
by: Mythmon | last post by:
I am trying to make a program that will basically simulate a chess clock in python. To do this I have two threads running, one that updates the currently running clock, and one that watches for a keypress. I am using the effbot Console module, and that is where I get the events for the keypresses. But when I press space it crashes shortly after. The program stops, the Console closes, and windows says that the program pythonw.exe has had an...
4
4226
by: sesling | last post by:
I currently use an SQL command line that utilizes parallel threads. ex. select /*+ PARALLEL (ACCOUNT 20) */ Account_ID, Customer_Name, Add_Date from Customer_Info. By running this query using parallel threads, it returns results in less than one minute. If I did not use the parallel threads, it would take 20 minutes or more to run. This command is run using SQL+ Is it possible to use Parallel thread processing in Access? If so, how?
43
4333
by: parallelpython | last post by:
Has anybody tried to run parallel python applications? It appears that if your application is computation-bound using 'thread' or 'threading' modules will not get you any speedup. That is because python interpreter uses GIL(Global Interpreter Lock) for internal bookkeeping. The later allows only one python byte-code instruction to be executed at a time even if you have a multiprocessor computer. To overcome this limitation, I've created...
3
2891
by: John | last post by:
I have a program that needs to run on a regular basis that looks at a queue table in my database. If there are items in the queue database I need to grab the data from the database and pass it to a web service to process. The web service will return either a completion code or error msg (the only errors expected would be timeout or cannot connection errors). This queue file can contain 0 to N messages. Naturally if there are no messages...
0
9712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10089
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9171
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.