|
-
February 28th, 2010, 12:48 PM
#1
to Process or not to Process?
Well, we all know the differences between processes and threads. Process has a little more of overhead than a thread, and threads have a common address space(well except for their stack), while processes have different address space.
but when I build an application why should it create different processes? why not having one process for each application and a lot of threads associated with it.
can you guru give me a real world example when it is appropriate to use more than one process in my application(whatever it would be..).
If threads have a little overhead over my app, it looks like I would prefer it over creating a lot of processes.
Thanks .
Last edited by Regel; February 28th, 2010 at 12:52 PM.
-
February 28th, 2010, 03:06 PM
#2
Re: to Process or not to Process?
One common practice is to give GUIs their own process, separate from the part of a program that actually does the hard work. This tends to enforce more modular coding styles.
-
February 28th, 2010, 04:55 PM
#3
Re: to Process or not to Process?
Sometimes it can be helpful to run plug-in engines in a separate process because of unexpected crashes caused by dodgy 3rd party dlls. If there is a crash you can shut down the plug-in process, but keep your main program alive.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|