CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2010
    Posts
    0

    Q. about allocating processes in .Net

    Hello all,

    I'm writing some program which should perform calculations concurrently according to inputs which reach the system all the time. I'm considering 2 approaches to allocate "calculation" processes:
    1. Allocating processes in the system initialization, insert the ids to Processes table, and each time I want to perform calculation, I will check in the table which process is free.
    The questions: can I be sure that those processes are only for my use and that the operating system doesn't use them?
    2. Not allocating processes in advance. Each time when calculation should be done ask the operating system for free process.

    I need to know the following inputs from a "calculation" process:
    1. When calculation is finished and also if it succeeded or failed
    2. If a processes has failed I need to assign the calculation to another process

    I hope my post is not too long.

    Thanks in advance. Any help would be appreciated.

    maya

  2. #2
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Q. about allocating processes in .Net

    It seems that you mean threads rahther then processes. Look at ThreadPool class and System.Threading namespace, especially at WaitHandle classes. Lock keyword could also be usefull for you.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

Tags for this Thread

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