CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Posts
    81

    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.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    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.

  3. #3
    Join Date
    Aug 2006
    Posts
    157

    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
  •  





Click Here to Expand Forum to Full Width

Featured